• 大小: 1.73MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-09-01
  • 语言: 其他
  • 标签: Runtime  Tran  

资源简介

;Runtime Transform Gizmos是一个脚本API,它可以让你在游戏中转换对象,能够在游戏中直观和专业的转换对象是非常有用的,特别是当你在运行时编辑器或游戏中,使用者可以移动、旋转和缩放对象。想要做一个模型工具吗?你肯定需要一些方法让他们在场景中操作对象,这个插件将可以完成。

资源截图

代码片段和文件信息

#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;

namespace RTEditor
{
    /// 
    /// Custom inspector implementation for the ‘EditorCamera‘ class.
    /// 

    [CustomEditor(typeof(EditorCamera))]
    public class EditorCameraInspectorGUI : Editor
    {
        private static bool _keyMappingsAreVisible = true;

        #region Private Variables
        /// 
        /// Reference to the currently selected editor camera.
        /// 

        private EditorCamera _editorCamera;

        /// 
        /// The following variables control the visibility for different categories of settings.
        /// 

        private static bool _zoomSettingsAreVisible = true;
        private static bool _panSettingsAreVisible = true;
        private static bool _focusSettingsAreVisible = true;
        private static bool _bkSettingsAreVisible = true;
        #endregion

        #region Public Methods
        /// 
        /// Called when the inspector needs to be rendered.
        /// 

        public override void OnInspectorGUI()
        {
            const int indentLevel = 2;
            if(RuntimeEditorApplication.Instance.UseCustomCamera)
            {
                EditorGUILayout.HelpBox(“Some camera properties can not be modified when a custom camera is used. You can use the “ + 
                                        “Runtime Editor Application Inspector to change this.“ UnityEditor.MessageType.Info);
                EditorGUILayout.BeginVertical(“Box“);
                RenderCameraBackgroundSettingsCtrls(indentLevel);
                EditorGUILayout.EndVertical();
                return;
            }

            float newFloatValue;
            int oldIndentLevel = EditorGUI.indentLevel;

            EditorGUILayout.BeginVertical(“Box“);
            // Let the user change the zoom settings
            EditorGUI.indentLevel = indentLevel - 1;
            _zoomSettingsAreVisible = EditorGUILayout.Foldout(_zoomSettingsAreVisible “Zoom Settings“);
            if(_zoomSettingsAreVisible)
            {
                EditorCameraZoomSettings zoomSettings = _editorCamera.ZoomSettings;
                EditorGUI.indentLevel = indentLevel;

                // Let the user specify if camera zoom is enabled/disabled
                bool newBool = EditorGUILayout.ToggleLeft(“Is Zoom Enabled“ zoomSettings.IsZoomEnabled);
                if(newBool != zoomSettings.IsZoomEnabled)
                {
                    UnityEditorUndoHelper.RecordobjectForInspectorPropertyChange(_editorCamera);
                    zoomSettings.IsZoomEnabled = newBool;
                }

                // Let the user specify the camera zoom mode
                EditorCameraZoomMode newZoomMode = (EditorCameraZoomMode)EditorGUILayout.EnumPopup(“Zoom Mode“ zoomSettings.ZoomMode);
                if (newZoomMode != zoomSettings.ZoomM

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件    1539930  2017-06-12 15:39  Runtime Transform Gizmos\Documentation\Runtime Transform Gizmos Documentation.pdf

     文件        176  2017-06-12 15:39  Runtime Transform Gizmos\Documentation\Runtime Transform Gizmos Documentation.pdf.meta

     文件        192  2017-08-05 13:44  Runtime Transform Gizmos\Documentation.meta

     文件      16464  2017-06-12 15:39  Runtime Transform Gizmos\Editor\EditorCameraInspectorGUI.cs

     文件        221  2017-06-12 15:39  Runtime Transform Gizmos\Editor\EditorCameraInspectorGUI.cs.meta

     文件       5386  2017-06-12 15:38  Runtime Transform Gizmos\Editor\EditorGizmoSystemInspectorGUI.cs

     文件        221  2017-06-12 15:38  Runtime Transform Gizmos\Editor\EditorGizmoSystemInspectorGUI.cs.meta

     文件      15125  2017-06-12 15:38  Runtime Transform Gizmos\Editor\EditorobjectSelectionInspectorGUI.cs

     文件        221  2017-06-12 15:38  Runtime Transform Gizmos\Editor\EditorobjectSelectionInspectorGUI.cs.meta

     文件       1594  2017-06-12 15:39  Runtime Transform Gizmos\Editor\EditorUndoRedoSystemInspectorGUI.cs

     文件        221  2017-06-12 15:39  Runtime Transform Gizmos\Editor\EditorUndoRedoSystemInspectorGUI.cs.meta

     文件       5991  2017-06-12 15:39  Runtime Transform Gizmos\Editor\GizmoInspectorGUIbase.cs

     文件        221  2017-06-12 15:39  Runtime Transform Gizmos\Editor\GizmoInspectorGUIbase.cs.meta

     文件        982  2017-06-12 15:39  Runtime Transform Gizmos\Editor\Helpers\EditorGUIstyles.cs

     文件        221  2017-06-12 15:39  Runtime Transform Gizmos\Editor\Helpers\EditorGUIstyles.cs.meta

     文件        192  2017-08-05 13:44  Runtime Transform Gizmos\Editor\Helpers.meta

     文件      10040  2017-06-12 15:38  Runtime Transform Gizmos\Editor\RotationGizmoInspectorGUI.cs

     文件        221  2017-06-12 15:39  Runtime Transform Gizmos\Editor\RotationGizmoInspectorGUI.cs.meta

     文件       5684  2017-06-12 15:39  Runtime Transform Gizmos\Editor\RuntimeEditorApplicationInspectorGUI.cs

     文件        221  2017-06-12 15:39  Runtime Transform Gizmos\Editor\RuntimeEditorApplicationInspectorGUI.cs.meta

     文件      11472  2017-06-12 15:38  Runtime Transform Gizmos\Editor\ScaleGizmoInspectorGUI.cs

     文件        221  2017-06-12 15:38  Runtime Transform Gizmos\Editor\ScaleGizmoInspectorGUI.cs.meta

     文件       3376  2017-06-12 15:39  Runtime Transform Gizmos\Editor\SceneGizmoInspectorGUI.cs

     文件        264  2017-06-12 15:39  Runtime Transform Gizmos\Editor\SceneGizmoInspectorGUI.cs.meta

     文件       9784  2017-06-12 15:38  Runtime Transform Gizmos\Editor\TranslationGizmoInspectorGUI.cs

     文件        221  2017-06-12 15:38  Runtime Transform Gizmos\Editor\TranslationGizmoInspectorGUI.cs.meta

     文件       2251  2017-06-12 15:38  Runtime Transform Gizmos\Editor\VolumeScaleGizmoInspectorGUI.cs

     文件        264  2017-06-12 15:38  Runtime Transform Gizmos\Editor\VolumeScaleGizmoInspectorGUI.cs.meta

     文件        192  2017-08-05 13:44  Runtime Transform Gizmos\Editor.meta

     文件       2132  2017-06-12 15:39  Runtime Transform Gizmos\Readme\Hotkeys.txt

............此处省略456个文件信息

评论

共有 条评论