Пример #1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
         GameObject.DontDestroyOnLoad(this.gameObject); // 씬 로딩을 할 때(옮겨다닐 때) 지우지마라
     }
 }
Пример #2
0
    void Start()
    {
        SC2D_Manager = ShadowCaster2D_Manager.Instance;
        if (SC2D_Manager == null)
        {
            Debug.Log("!!! SC2D_Manager is null !!!");
        }

        SC2D_Manager.AddShadowLightObj(this.gameObject);

        switch (lightCategory)
        {
        case ELight2DCategory.Directional:
            Init_Directinal();
            break;

        case ELight2DCategory.Radial:
            Init_Redial();
            break;
        }
    }