Cross scene gameobject referencing based on component (Editor Script)
I want to make an editor script to help with my traveling between scenes. It's working fine just a bit tedious. I do this by having a component set my "GameManager" (A DontDestroyOnLoad object) variable to the name of the object I want to go to in my other area. Then when this other area is loaded I look at my "GameManager" variable and travel to this object.
I want to make an editor script to load all the gameobjects of my target scene that have a certain component attached to it and display this list to me. Is this possible?
Example:
Im in scene1 and want to make a transition to scene2. I open the editor script, give it my target scene, and it generates a list of possible points to travel to. Then I look at the list and input the name that I want to travel to. I do this while never having to leave scene1.
Now I already know about loading 2 scenes at once by dragging them both into the hierarchy. I don't want to do this as these scenes are large and costly. (I will through this script if I have to I guess....)
Your answer
Follow this Question
Related Questions
How to reference a class repeadedly ,How to update a reference? 0 Answers
How to change Texture in editor 0 Answers
Any way to set AnimatorOverrideController's animation clips programatically? 1 Answer
How to get mouse click world position in the scene view in editor script? 3 Answers
Error loading auto-generated monobehavior at run-time 0 Answers