コード例 #1
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else if (Instance != this)
        {
            Destroy(gameObject);
        }

        _mainThreadActions         = new List <Action>();
        _mainThreadActionsMultiple = new List <Action>();
    }
コード例 #2
0
ファイル: ThreadQueuer.cs プロジェクト: ap1459/Koxel
    /*void Start()
     * {
     *  // BIG HUGE NOTE:     WebGL doesn't do multithreading.
     *
     *  Debug.Log("Start() -- Started.");
     *  functionsToRunInMainThread = new List<Action>();
     *
     *  StartThreadedFunction( () => { SlowFunctionThatDoesAUnityThing( Vector3.zero, new float[4], new Color[100] ); } );
     *
     *  Debug.Log("Start() -- Done.");
     * }*/

    void Awake()
    {
        instance = this;
        functionsToRunInMainThread = new List <Action>();
    }
コード例 #3
0
 private void Awake()
 {
     instance = this;
 }