示例#1
0
    /// <summary>
    /// TODO:
    /// </summary>
    void OnGUI_ChoosePrewarper()
    {
        EditorGUILayout.BeginVertical();
        EditorGUI.BeginChangeCheck();
        DanbiController.PushSpace(6);

        // 1. Start to draw Enum Popup.
        CurrentPrewarperType = (EDanbiPrewarperType)EditorGUILayout.EnumPopup("Prewarper Type ", CurrentPrewarperType);
        DanbiController.PushSpace(6);

        // 2. If there's dirty on the Enum Popup,
        if (EditorGUI.EndChangeCheck())
        {
            // 3. Invoke the delegate that is linked to change the current prewarper.
            DanbiFwdObjects.PrewarperActivatorAction.Invoke(CurrentPrewarperType);
            // 4. Update all the linked references.
            DanbiFwdObjects.Cams = FindObjectsOfType <Camera>();
            foreach (var cam in DanbiFwdObjects.Cams)
            {
                Debug.Log($"{cam.name} is selected! number of cameras : {DanbiFwdObjects.Cams.Length}.");
            }
        }
        EditorGUILayout.EndVertical();
    }
示例#2
0
 static DanbiController()
 {
     UpdateCounter        = 0.0f;
     CurrentPrewarperType = EDanbiPrewarperType.HalfSphereMirror8cm_Cube_Panorama_Screen;
 }