How to create game-wide object in Unity3d without singleton?
问题 Is there a way in Unity3d framework to register an object that would be accessible to all entities in all scenes in the game without resorting to singleton pattern (like a game state object)? 回答1: You could take the following approach: In the scene where the GameObject is created, in a MonoBehavior script attached to the GameObject: Name the GameObject with "name = ..." in Awake() (or in the Editor) Example: myObject.name = "FindMeInEveryScene"; Ref: https://docs.unity3d.com/ScriptReference