Example #1
0
        private void AddObjectAndChildrenToBlackList(Transform obj, UdonManager udonManager)
        {
            udonManager.Blacklist(obj.gameObject);

            for (int child = 0; child < obj.childCount; ++child)
            {
                AddObjectAndChildrenToBlackList(obj.GetChild(child), udonManager);
            }
        }
Example #2
0
    public void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
        }

        if (this == Instance)
        {
            return;
        }

        if (Application.isPlaying)
        {
            Destroy(this);
        }
        else
        {
            DestroyImmediate(this);
        }
    }