Beispiel #1
0
    void showWorldEditor()
    {
        // World edit mode change not allowed while something is selected
        if (!Draggable.HasSelection)
        {
            IsWorldEditorActive = !IsWorldEditorActive;
            objectListUI.gameObject.SetActive(IsWorldEditorActive);
            if (!IsWorldEditorActive)
            {
                worldEditorInsturctions.GetComponent <Animator>().SetTrigger("close");
            }
            else
            {
                worldEditorInsturctions.GetComponent <Animator>().SetTrigger("pop");
            }

            if (IsWorldEditorActive && !isInitialized)
            {
                objectListUI.Initalize(netManager.spawnPrefabs);
                isInitialized = true;
            }
        }
    }