资源简介
;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.me
文件 192 2017-08-05 13:44 Runtime Transform Gizmos\Documentation.me
文件 16464 2017-06-12 15:39 Runtime Transform Gizmos\Editor\EditorCameraInspectorGUI.cs
文件 221 2017-06-12 15:39 Runtime Transform Gizmos\Editor\EditorCameraInspectorGUI.cs.me
文件 5386 2017-06-12 15:38 Runtime Transform Gizmos\Editor\EditorGizmoSystemInspectorGUI.cs
文件 221 2017-06-12 15:38 Runtime Transform Gizmos\Editor\EditorGizmoSystemInspectorGUI.cs.me
文件 15125 2017-06-12 15:38 Runtime Transform Gizmos\Editor\Editorob
文件 221 2017-06-12 15:38 Runtime Transform Gizmos\Editor\Editorob
文件 1594 2017-06-12 15:39 Runtime Transform Gizmos\Editor\EditorUndoRedoSystemInspectorGUI.cs
文件 221 2017-06-12 15:39 Runtime Transform Gizmos\Editor\EditorUndoRedoSystemInspectorGUI.cs.me
文件 5991 2017-06-12 15:39 Runtime Transform Gizmos\Editor\GizmoInspectorGUIba
文件 221 2017-06-12 15:39 Runtime Transform Gizmos\Editor\GizmoInspectorGUIba
文件 982 2017-06-12 15:39 Runtime Transform Gizmos\Editor\Helpers\EditorGUIst
文件 221 2017-06-12 15:39 Runtime Transform Gizmos\Editor\Helpers\EditorGUIst
文件 192 2017-08-05 13:44 Runtime Transform Gizmos\Editor\Helpers.me
文件 10040 2017-06-12 15:38 Runtime Transform Gizmos\Editor\RotationGizmoInspectorGUI.cs
文件 221 2017-06-12 15:39 Runtime Transform Gizmos\Editor\RotationGizmoInspectorGUI.cs.me
文件 5684 2017-06-12 15:39 Runtime Transform Gizmos\Editor\RuntimeEditorApplicationInspectorGUI.cs
文件 221 2017-06-12 15:39 Runtime Transform Gizmos\Editor\RuntimeEditorApplicationInspectorGUI.cs.me
文件 11472 2017-06-12 15:38 Runtime Transform Gizmos\Editor\ScaleGizmoInspectorGUI.cs
文件 221 2017-06-12 15:38 Runtime Transform Gizmos\Editor\ScaleGizmoInspectorGUI.cs.me
文件 3376 2017-06-12 15:39 Runtime Transform Gizmos\Editor\SceneGizmoInspectorGUI.cs
文件 264 2017-06-12 15:39 Runtime Transform Gizmos\Editor\SceneGizmoInspectorGUI.cs.me
文件 9784 2017-06-12 15:38 Runtime Transform Gizmos\Editor\TranslationGizmoInspectorGUI.cs
文件 221 2017-06-12 15:38 Runtime Transform Gizmos\Editor\TranslationGizmoInspectorGUI.cs.me
文件 2251 2017-06-12 15:38 Runtime Transform Gizmos\Editor\VolumeScaleGizmoInspectorGUI.cs
文件 264 2017-06-12 15:38 Runtime Transform Gizmos\Editor\VolumeScaleGizmoInspectorGUI.cs.me
文件 192 2017-08-05 13:44 Runtime Transform Gizmos\Editor.me
文件 2132 2017-06-12 15:39 Runtime Transform Gizmos\Readme\Hotkeys.txt
............此处省略456个文件信息
相关资源
- Gilbert_Strang-Linear_Algebra_and_Its_Applicat
- Transactional Memory 2nd edition - Synthesis L
- Transiesta-C 英文手册
- fragment+radioButton实现底部菜单切换fr
- 一篇IEEE trans的图像分析顶级论文
- SCITranslate11安装包安装教程.pdf
- StatTransfer7.0.2
- 开源有限元程序feappv
- Gilbert Strang-计算科学与工程Computatio
- TransCAD交通规划详细步骤、案例分析
- ComputationalScienceandEngineeringByGilbertStr
- 魏凤英《现代气候统计诊断与预测技
- transcad四阶段法
- Speech Recognition Algorithms Using Weighted F
- Compaq Visual Fortran Version 6.6安装说明
- Linear Algebra and Its Applications 4th Editio
- 中科院研究生院计算流体力学基准算
- actran_13_users_guide
- MODTRAN使用PPT(北师大版)
- BS-ISO15622-2018--Intelligent transport system
- nvidia-container-runtime-1.0.0-1.docker17.03.2
- ABAQUS 子程序 断裂模型
- qt-tcp-FileTransfer.zip
- Genymotion-ARM-Translation_for_8.0
- DocTranslate(Doc和PPT翻译软件)v1.1.0.
- 大气辐射传输模型MODTRAN4
- Translate.zip
- Modran4_带说明.zip
- Microsoft.Runtimes.AIO.2017.Setup
- ArcGIS Engine 10 Runtime 安装包 - Part 6 /
评论
共有 条评论