|
I'm trying to do a Potencial Visibility Set system and I have some problems about the runtime. In the editor I have a button in a editor class to calculate which transforms are potencialy visible. This metod is very expensive and I save to disk this informations in a XML file. The XML is like this:
Every number is a transform ID that I get it with metod GetInstanceID. I want to transform this number to a transform again in the start metod of the camera but the only metod that i know is EditorUtility.InstanceIDToObject but it's for the editor only. Any ideas? Thx
(comments are locked)
|
|
Instance IDs are only valid within the same session. In stead I'd suggest saving the path of the GameObject.
Edit: Since you're working with GameObjects with non-unique names, you could alternatively set up a custom asset to store serialized references to your GameObjects. Custom asset handling:
I will try it and I will tell you something Thx
Dec 11 '09 at 01:08 PM
limdor
Hey Emil, do you know is the method you described with a custom asset going to work even after switching to another scene and then back to the original, or at least after reopening the project in the Editor? Seems like that failed according to this: http://answers.unity3d.com/questions/188059/how-to-reference-a-scene-gameobject-from-a-custom.html
Nov 23 '12 at 05:07 AM
Flipbookee
(comments are locked)
|
