|
Hi
(comments are locked)
|
There's a lot of different ways to find objects. Other than the slow brittle last-resort ones I mentioned above, there's having a reference to one (either set per-object or in the script's import options) or having the object register itself during OnEnable. Which one's the best is heavily dependent on your particular need..... what are you trying to find, and what are your constraints? Thanks for the info. I have a couple of uses for it. The main one is for a replay system where the objects and their actions/operations are loaded and parsed and applied to the object. I'm trying to do some planning and find some possible solutions. I may need to reference Objects by ID because I want to be able to stream the replays. I'm going to try and implement it so the operations are performed whilst the replay file is parsing and compare performance and loading times with other solutions. Hope that makes sense. I'll use Object.FindObjectsOfType(typeof(GameObject) and then find the one with the correct id. I thought maybe the objects get stored in order of id so a method would have provided faster searching.
Aug 07 '11 at 08:39 PM
Blankzz
(comments are locked)
|

I notice you haven't marked any of the answers to your last several questions as "accepted". Go do that, and then I can help you with this.
Thanks for pointing that out to me. I don't want to appear rude to people who have kindly helped me. Anyway all done now.