コード例 #1
0
        void Start()
        {
            /// Persistent Object

            if (current == null)
            {
                current = this;
                DontDestroyOnLoad(gameObject);
            }
            else
            {
                Destroy(gameObject);
            }
        }
コード例 #2
0
        void Start()
        {
            HudController obj = Instantiate(prefabHUD);

            obj.player = this;
        }