Sound designer/Game Developer based in South Yorkshire, UK
We're sorry, but no images, videos or audio files have been added to this gallery.
If you would like to share media with the community, sign up and you can.
edit 3 - just deleted this whole post in one click that was misdirected by stupid android web browser.. but no confirmation from desura?? not good!!
was still in laptop's history.. so i got it back..
anyway - my fix worked! and got other stuff working in android..
gonna have a belter of a thing soon!!
any ideas about this:-
is it even possible to set multiple constructors at once for an array of classes, or do i need a for loop to do this manually after each time that i want to do it?? is that how it should be done??
Turns out that constructors are run for each instance in an array of class instances, but only if they don't want anything in the brackets..
in this example, the constructor won't be run!
but here, it will!!
edit 2- got some valuable tips from here:-
regarding instantiation of built in arrays of classes
if you are going to do:-
var personArray : Person = new Person;
and then instantly attempt to access
or similar, you'll get an error...this object doesn't exist!! (though accessing it "a while" later will work fine!?!?!)
what is needed, as stated at the above address:-
"You need to instantiate a Person object for each element of the newly-declared array. The easiest way to do this would be in a for loop that iterates through the array, calling personArray[i]= new Person(); "
if you DON'T do this, however, it seems that unity's explorer WILL automatically instantiate person objects for this array if you run your code within the unity environment, though it will take a while (seemingly 2 update frames every time on my pc..) for this to occur.. potentially leading to some very hard to spot bugs, and almost certainly leading to code that works fine in the unity environment thingy (what's the actual word for this!?!) but won't run when compiled for anything else!!
at least i think that this is what is happening.. i'm gonna see if altering this fixes my thing that isn't working anywhere except within unity...