I am updating the particle effect.. in the last part here:
that should be updating it.. sorry if that is not what you meant.
could you not just open unity and try out the script?
sorry if I'm being ignorant but I have only been using unity for about half a year.
I am making a script that scales particleFX similar to transform scale so if you change scale to 2 then its twice as big....
I its working prefect except one problem.
Once I enter play mode or delete the particle prefab from the scene and then drag a new one into the hierarchy the data for the scale is lost.
along with this code I have a editor script that calls the UpdateScale function when a button is pressed.
So I was wondering if there is anyway to make that scale data get saved....
Hopefully I worded this correctly. I am in a hurry to get this code ready.. so any help would be greatly appreciated!
See this related question I just asked.
You need to explicitly tell unity the type of your array. You have to explicitly type the array with your target type. Simple. Use a built-in array or a List.
Then you can allocate enough memory (since you can't use Add() any longer):
You were allocating arrays in the loop. Also I cleaned up some of the code to make it a little more readable. Are you sure that you are updating the emitters somewhere along the way after you've edited them?
ok I am using the exact same code you posted and here is a pic of the Hierarchy:
ok sorry for answering instead of commenting but that would be the last comment, so then you could not write back.
so still not working.. I might gave overlooked something..
thanks a lot for helping me this!
here is the updated code: