/// <inheritdoc />
        public override void OnInspectorGUI()
        {
            _target.CharacterSettingsIdentity = EditorGUILayoutGameUtility.CharacterSettingsField("Character Settings", _target.CharacterSettingsIdentity);

            // Draw extras!
            EditorGUILayout.Space();
            EditorGUILayout.Space();
            EditorGUILayoutGameUtility.DrawTargetExtras(target);
        }
        /// <inheritdoc />
        public override void OnInspectorGUI()
        {
            if (!CustomEditorStyles.IsCustomStyleLoaded())
            {
                return;
            }
            serializedObject.Update();

            // Draw Identity settings
            _drawIdentitySettings.value = EditorGUILayout.BeginFoldoutHeaderGroup(_drawIdentitySettings.value, "Identity Settings");
            if (_drawIdentitySettings.value)
            {
                EditorGUILayout.Space();
                EditorGUILayout.Space();
                EditorGUI.indentLevel++;
                UniqueGUID.stringValue = EditorGUILayoutGameUtility.GUIDField("Unique GUID", UniqueGUID.stringValue);
                EditorGUI.indentLevel--;
                EditorGUILayout.Space();
            }
            EditorGUILayout.EndFoldoutHeaderGroup();

            // Draw Content
            _drawContent.value = EditorGUILayout.BeginFoldoutHeaderGroup(_drawContent.value, "Content");
            if (_drawContent.value)
            {
                EditorGUILayout.Space();
                EditorGUILayout.Space();
                EditorGUI.indentLevel++;

                GUILayout.Label("Defs", EditorStyles.boldLabel);
                EditorGUILayout.PropertyField(LevelSpawnNames, true);

                GUILayout.Label("Databases", EditorStyles.boldLabel);
                EditorGUILayout.BeginHorizontal();
                if (GUILayout.Button("Refresh Databases", GUILayout.Height(25)))
                {
                    _target.RefreshDatabases();
                }
                if (GUILayout.Button("Info", GUILayout.Height(25), GUILayout.Width(35)))
                {
                    SharedContentEditorWindow.ShowWindowOnCharacters();
                }

                EditorGUILayout.EndHorizontal();

                EditorGUILayout.PropertyField(UniqueDatabases, true);
                EditorGUI.indentLevel--;
                EditorGUILayout.Space();
            }
            EditorGUILayout.EndFoldoutHeaderGroup();

            // Draw extras
            EditorGUILayoutGameUtility.DrawTargetExtras(target);

            serializedObject.ApplyModifiedProperties();
        }
예제 #3
0
        /// <inheritdoc />
        public override void OnInspectorGUI()
        {
            _target.Identity = (short)EditorGUILayout.IntField("Identity", _target.Identity);
            JEMBetterEditor.DrawProperty(" ", () =>
            {
                if (GUILayout.Button("Regenerate Identity"))
                {
                    RefreshIdentity();
                }
            });

            _drawNetworkBehaviour.value = EditorGUILayout.BeginFoldoutHeaderGroup(_drawNetworkBehaviour.value, "Network Behaviour");
            if (_drawNetworkBehaviour.value)
            {
                EditorGUILayout.Space();
                EditorGUILayout.Space();
                EditorGUI.indentLevel++;
                _target.NetworkBehaviour.ActiveOnClient = EditorGUILayout.Toggle("Active On Client", _target.NetworkBehaviour.ActiveOnClient);
                _target.NetworkBehaviour.ActiveOnServer = EditorGUILayout.Toggle("Active On Server", _target.NetworkBehaviour.ActiveOnServer);
                EditorGUI.indentLevel--;
                EditorGUILayout.Space();
            }
            EditorGUILayout.EndFoldoutHeaderGroup();

            _drawReferences.value = EditorGUILayout.BeginFoldoutHeaderGroup(_drawReferences.value, "References");
            if (_drawReferences.value)
            {
                EditorGUILayout.Space();
                EditorGUILayout.Space();
                EditorGUI.indentLevel++;
                _target.References.ModelRoot         = (GameObject)EditorGUILayout.ObjectField("Model Root", _target.References.ModelRoot, typeof(GameObject), true);
                _target.References.CharacterSettings = (CharacterSettingsReference)EditorGUILayout.ObjectField("Character Settings", _target.References.CharacterSettings, typeof(CharacterSettingsReference), false);
                EditorGUI.indentLevel--;
                EditorGUILayout.Space();
            }
            EditorGUILayout.EndFoldoutHeaderGroup();

            if (_target.References.ModelRoot == null)
            {
                EditorGUILayout.HelpBox("ModelRoot of level object is not set!", MessageType.Warning, true);
            }
            else if (_target.References.ModelRoot == _target.gameObject)
            {
                EditorGUILayout.HelpBox("Setting this gameObject as ModelRoot may create problems.", MessageType.Warning, true);
            }

            EditorGUILayoutGameUtility.DrawTargetExtras(_target);
        }
예제 #4
0
        /// <inheritdoc />
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            // JEM Area
            EditorGUILayout.PropertyField(Mode);
            EditorGUILayout.PropertyField(AgentHeight);
            EditorGUILayout.PropertyField(AgentSize);
            EditorGUILayout.PropertyField(ForwardMode);
            EditorGUILayout.PropertyField(ResetForwardY);

            EditorGUILayout.PropertyField(HitMask);

            // Actual Content :)
            SpawnName.stringValue = EditorGUILayoutGameUtility.LevelSpawnNameField("Spawn Name", SpawnName.stringValue);
            EditorGUILayout.PropertyField(IsDefault);

            serializedObject.ApplyModifiedProperties();
        }
        /// <inheritdoc />
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            //
            // SECTION: Main Settings
            //
            _drawMainSettings.value = DrawSectionGUI(_drawMainSettings.value, "Main Settings", () =>
            {
                EditorGUILayout.PropertyField(Icon);
                EditorGUILayout.PropertyField(LocaleName);
                EditorGUILayout.PropertyField(StatisticsPrefab);
            });

            //
            // SECTION: Resources Settings
            //
            _drawResourcesSettings.value = DrawSectionGUI(_drawResourcesSettings.value, "Resources Settings", () =>
            {
                EditorGUILayout.PropertyField(ModelPrefab);
                EditorGUILayout.PropertyField(HandsPrefab);
            });

            //
            // SECTION: Animations Settings
            //
            _drawAnimationSettings.value = DrawSectionGUI(_drawAnimationSettings.value, "Animation Settings", () =>
            {
                DefaultAnimatorController.intValue = EditorGUILayoutGameUtility.AnimationSettingsField("Default Animator", DefaultAnimatorController.intValue);
            });

            // And draw the content...
            DrawDatabaseItemGUI();

            serializedObject.ApplyModifiedProperties();
        }
 /// <inheritdoc />
 public override void OnInspectorGUI()
 {
     _target.CharacterSettingsIdentity = EditorGUILayoutGameUtility.CharacterSettingsField("Character Settings", _target.CharacterSettingsIdentity);
 }
예제 #7
0
 /// <inheritdoc />
 public override void OnInspectorGUI()
 {
     _target.MaterialIdentity = EditorGUILayoutGameUtility.MaterialSettingsField("Material Settings", _target.MaterialIdentity);
 }
        /// <inheritdoc />
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            //
            // SECTION: Controller Settings
            //
            _drawControllerSettings.value = DrawSectionGUI(_drawControllerSettings.value, "Controller Settings", () =>
            {
                EditorGUILayout.PropertyField(Type);
                AnimatorController.intValue = EditorGUILayoutGameUtility.AnimationSettingsField("Animator Controller", AnimatorController.intValue);
            });

            //
            // SECTION: Resources Settings
            //
            _drawResourcesSettings.value = DrawSectionGUI(_drawResourcesSettings.value, "Resources Settings", () =>
            {
                EditorGUILayout.PropertyField(FPPModel);
                EditorGUILayout.PropertyField(TPPModel);
            });

            //
            // SECTION: Fire Settings
            //
            _drawFireSettings.value = DrawSectionGUI(_drawFireSettings.value, "Fire Settings", () =>
            {
                EditorGUILayout.PropertyField(RoundsPerMinute);
                EditorGUILayout.PropertyField(RecoilAndSpreadFramesLimit);
                EditorGUILayout.PropertyField(CanFireWhileRunning);
            });

            //
            // SECTION: Bullet Settings
            //
            _drawBulletSettings.value = DrawSectionGUI(_drawBulletSettings.value, "Bullet Settings", () =>
            {
                EditorGUILayout.PropertyField(BulletVelocity);
                EditorGUILayout.PropertyField(BulletVelocityTimeout);
                EditorGUILayout.PropertyField(BulletGravity);
                EditorGUILayout.PropertyField(BulletRadius);
                EditorGUILayout.PropertyField(BulletRaycastDistance);
                EditorGUILayout.PropertyField(BulletDamage);
                EditorGUILayout.PropertyField(BulletTimeout);
            });

            //
            // SECTION: Reload Settings
            //
            _drawReloadSettings.value = DrawSectionGUI(_drawReloadSettings.value, "Reload Settings", () =>
            {
                EditorGUILayout.PropertyField(ReloadTime);
            });

            //
            // SECTION: Camera Settings
            //
            _drawCameraSettings.value = DrawSectionGUI(_drawCameraSettings.value, "Camera Settings", () =>
            {
                EditorGUILayout.PropertyField(CameraShakeFromLast);
                EditorGUILayout.PropertyField(CameraShakeToNext);
            });

            //
            // SECTION: Bullet Spread Settings
            //
            _drawBulletSpreadSettings.value = DrawSectionGUI(_drawBulletSpreadSettings.value, "Bullet Spread Settings", () =>
            {
                EditorGUILayout.PropertyField(SpreadWarmupTime);
                EditorGUILayout.PropertyField(HorizontalSpread);
                EditorGUILayout.PropertyField(VerticalSpread);
                EditorGUILayout.PropertyField(HorizontalSpreadTimeMod);
                EditorGUILayout.PropertyField(HorizontalSpreadTimeModCooldown);
                EditorGUILayout.PropertyField(VerticalSpreadTimeMod);
                EditorGUILayout.PropertyField(VerticalSpreadTimeModCooldown);
                EditorGUILayout.PropertyField(SpreadTimeModEnabled);
            });

            //
            // SECTION: Bullet Recoil Settings
            //
            _drawBulletRecoilSettings.value = DrawSectionGUI(_drawBulletRecoilSettings.value, "Bullet Recoil Settings", () =>
            {
                EditorGUILayout.PropertyField(RecoilWarmupTime);
                EditorGUILayout.PropertyField(HorizontalRecoilTimeMod);
                EditorGUILayout.PropertyField(HorizontalRecoilTimeModCooldown);
                EditorGUILayout.PropertyField(VerticalRecoilTimeMod);
                EditorGUILayout.PropertyField(VerticalRecoilTimeModCooldown);
            });

            //
            // SECTION: State Settings
            //
            _drawStateSettings.value = DrawSectionGUI(_drawStateSettings.value, "State Settings", () =>
            {
                EditorGUILayout.PropertyField(RunSpreadMod);
                EditorGUILayout.PropertyField(RunRecoilMod);
                EditorGUILayout.PropertyField(MoveSpreadMod);
                EditorGUILayout.PropertyField(MoveRecoilMod);
                EditorGUILayout.PropertyField(CrouchSpreadMod);
                EditorGUILayout.PropertyField(CrouchRecoilMod);
                EditorGUILayout.PropertyField(AimSpreadMod);
                EditorGUILayout.PropertyField(AimRecoilMod);
            });

            //
            // SECTION: Audio Settings
            //
            _drawAudioSettings.value = DrawSectionGUI(_drawAudioSettings.value, "Audio Settings", () =>
            {
                EditorGUILayout.PropertyField(FireSounds, true);
                EditorGUILayout.PropertyField(FireSoundPitchRange);
            });

            // And draw the content...
            DrawDatabaseItemGUI();

            serializedObject.ApplyModifiedProperties();
        }