コード例 #1
0
    public override void OnInspectorGUI()
    {
        serializedObject.Update();

        EditorGUILayout.PropertyField(cameraMode_Prop);
        EditorGUILayout.PropertyField(mat_Prop);
        EditorGUILayout.PropertyField(matColor_Prop);

        //Get which enum is selected.
        CameraController.CameraType cameraMode = (CameraController.CameraType)cameraMode_Prop.enumValueIndex;

        if (cameraMode == CameraController.CameraType.Scroller)
        {
            GUIStyle tStyle = GUI.skin.GetStyle("Label");
            tStyle.alignment = TextAnchor.UpperCenter;

            EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
            EditorGUILayout.LabelField("Scroller Options", tStyle);
            EditorGUILayout.PropertyField(scrollerSpeed_Prop);
        }

        serializedObject.ApplyModifiedProperties();
    }
コード例 #2
0
 public void SetCameraMode(CameraController.CameraType camType)
 {
     _cameraCtrl.SetCurrentCamera(camType);
 }