Exists() public static method

public static Exists ( ) : bool
return bool
コード例 #1
0
    public void StartAcceptingMessages()
    {
        Debug.Log("Started accepting messages");

        meshTarget = GameObject.Find("BlendShapeTarget").GetComponent <SkinnedMeshRenderer> ();

        if (meshTarget == null)
        {
            Debug.LogError("Cannot find BlendShapeTarget. Have you added it to your scene?");
            return;
        }

        if (UnityMainThreadDispatcher.Exists())
        {
            dispatcher = UnityMainThreadDispatcher.Instance();
        }
        else
        {
            Debug.LogError("Cannot reach BlendShapeTarget. Have you added the UnityMainThreadDispatcher to your scene?");
        }

        isAcceptingMessages = true;
    }