├── .gitignore ├── Assets ├── Scenes.meta ├── Scenes │ ├── SampleScene.unity │ └── SampleScene.unity.meta ├── SimpleTimeLineWindow.meta └── SimpleTimeLineWindow │ ├── Editor.meta │ ├── Editor │ ├── EditorGUIExt.cs │ ├── EditorGUIExt.cs.meta │ ├── ExampleTimeLine.cs │ ├── ExampleTimeLine.cs.meta │ ├── ResManager.cs │ ├── ResManager.cs.meta │ ├── SimpleTimeArea.cs │ ├── SimpleTimeArea.cs.meta │ ├── TickHandler.cs │ ├── TickHandler.cs.meta │ ├── TimeArea.cs │ ├── TimeArea.cs.meta │ ├── TimeAreaTools.cs │ ├── TimeAreaTools.cs.meta │ ├── TimeUtility.cs │ ├── TimeUtility.cs.meta │ ├── ZoomableArea.cs │ └── ZoomableArea.cs.meta │ ├── EditorResources.meta │ └── EditorResources │ ├── CutOffLinePlayhead.png │ ├── CutOffLinePlayhead.png.meta │ ├── CutOffTimeCursor.png │ ├── CutOffTimeCursor.png.meta │ ├── KeyCircle.png │ ├── KeyCircle.png.meta │ ├── KeyDiamond.png │ ├── KeyDiamond.png.meta │ ├── KeySquare.png │ ├── KeySquare.png.meta │ ├── Playhead.png │ ├── Playhead.png.meta │ ├── SettingsIcon.png │ ├── SettingsIcon.png.meta │ ├── StopIcon.png │ ├── StopIcon.png.meta │ ├── Timecursor.png │ └── Timecursor.png.meta ├── LICENSE ├── Packages └── manifest.json ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f704ae4b4f98ae41a0bce26658850c1 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_TemporalCoherenceThreshold: 1 54 | m_EnvironmentLightingMode: 0 55 | m_EnableBakedLightmaps: 1 56 | m_EnableRealtimeLightmaps: 0 57 | m_LightmapEditorSettings: 58 | serializedVersion: 10 59 | m_Resolution: 2 60 | m_BakeResolution: 10 61 | m_AtlasSize: 512 62 | m_AO: 0 63 | m_AOMaxDistance: 1 64 | m_CompAOExponent: 1 65 | m_CompAOExponentDirect: 0 66 | m_Padding: 2 67 | m_LightmapParameters: {fileID: 0} 68 | m_LightmapsBakeMode: 1 69 | m_TextureCompression: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_MixedBakeMode: 2 75 | m_BakeBackend: 1 76 | m_PVRSampling: 1 77 | m_PVRDirectSampleCount: 32 78 | m_PVRSampleCount: 256 79 | m_PVRBounces: 2 80 | m_PVRFilterTypeDirect: 0 81 | m_PVRFilterTypeIndirect: 0 82 | m_PVRFilterTypeAO: 0 83 | m_PVRFilteringMode: 1 84 | m_PVRCulling: 1 85 | m_PVRFilteringGaussRadiusDirect: 1 86 | m_PVRFilteringGaussRadiusIndirect: 5 87 | m_PVRFilteringGaussRadiusAO: 2 88 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 89 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 90 | m_PVRFilteringAtrousPositionSigmaAO: 1 91 | m_ShowResolutionOverlay: 1 92 | m_LightingDataAsset: {fileID: 0} 93 | m_UseShadowmask: 1 94 | --- !u!196 &4 95 | NavMeshSettings: 96 | serializedVersion: 2 97 | m_ObjectHideFlags: 0 98 | m_BuildSettings: 99 | serializedVersion: 2 100 | agentTypeID: 0 101 | agentRadius: 0.5 102 | agentHeight: 2 103 | agentSlope: 45 104 | agentClimb: 0.4 105 | ledgeDropHeight: 0 106 | maxJumpAcrossDistance: 0 107 | minRegionArea: 2 108 | manualCellSize: 0 109 | cellSize: 0.16666667 110 | manualTileSize: 0 111 | tileSize: 256 112 | accuratePlacement: 0 113 | debug: 114 | m_Flags: 0 115 | m_NavMeshData: {fileID: 0} 116 | --- !u!1 &170076733 117 | GameObject: 118 | m_ObjectHideFlags: 0 119 | m_CorrespondingSourceObject: {fileID: 0} 120 | m_PrefabInternal: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 170076735} 124 | - component: {fileID: 170076734} 125 | m_Layer: 0 126 | m_Name: Directional Light 127 | m_TagString: Untagged 128 | m_Icon: {fileID: 0} 129 | m_NavMeshLayer: 0 130 | m_StaticEditorFlags: 0 131 | m_IsActive: 1 132 | --- !u!108 &170076734 133 | Light: 134 | m_ObjectHideFlags: 0 135 | m_CorrespondingSourceObject: {fileID: 0} 136 | m_PrefabInternal: {fileID: 0} 137 | m_GameObject: {fileID: 170076733} 138 | m_Enabled: 1 139 | serializedVersion: 8 140 | m_Type: 1 141 | m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} 142 | m_Intensity: 1 143 | m_Range: 10 144 | m_SpotAngle: 30 145 | m_CookieSize: 10 146 | m_Shadows: 147 | m_Type: 2 148 | m_Resolution: -1 149 | m_CustomResolution: -1 150 | m_Strength: 1 151 | m_Bias: 0.05 152 | m_NormalBias: 0.4 153 | m_NearPlane: 0.2 154 | m_Cookie: {fileID: 0} 155 | m_DrawHalo: 0 156 | m_Flare: {fileID: 0} 157 | m_RenderMode: 0 158 | m_CullingMask: 159 | serializedVersion: 2 160 | m_Bits: 4294967295 161 | m_Lightmapping: 1 162 | m_LightShadowCasterMode: 0 163 | m_AreaSize: {x: 1, y: 1} 164 | m_BounceIntensity: 1 165 | m_ColorTemperature: 6570 166 | m_UseColorTemperature: 0 167 | m_ShadowRadius: 0 168 | m_ShadowAngle: 0 169 | --- !u!4 &170076735 170 | Transform: 171 | m_ObjectHideFlags: 0 172 | m_CorrespondingSourceObject: {fileID: 0} 173 | m_PrefabInternal: {fileID: 0} 174 | m_GameObject: {fileID: 170076733} 175 | m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261} 176 | m_LocalPosition: {x: 0, y: 3, z: 0} 177 | m_LocalScale: {x: 1, y: 1, z: 1} 178 | m_Children: [] 179 | m_Father: {fileID: 0} 180 | m_RootOrder: 1 181 | m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} 182 | --- !u!1 &534669902 183 | GameObject: 184 | m_ObjectHideFlags: 0 185 | m_CorrespondingSourceObject: {fileID: 0} 186 | m_PrefabInternal: {fileID: 0} 187 | serializedVersion: 6 188 | m_Component: 189 | - component: {fileID: 534669905} 190 | - component: {fileID: 534669904} 191 | - component: {fileID: 534669903} 192 | m_Layer: 0 193 | m_Name: Main Camera 194 | m_TagString: Untagged 195 | m_Icon: {fileID: 0} 196 | m_NavMeshLayer: 0 197 | m_StaticEditorFlags: 0 198 | m_IsActive: 1 199 | --- !u!81 &534669903 200 | AudioListener: 201 | m_ObjectHideFlags: 0 202 | m_CorrespondingSourceObject: {fileID: 0} 203 | m_PrefabInternal: {fileID: 0} 204 | m_GameObject: {fileID: 534669902} 205 | m_Enabled: 1 206 | --- !u!20 &534669904 207 | Camera: 208 | m_ObjectHideFlags: 0 209 | m_CorrespondingSourceObject: {fileID: 0} 210 | m_PrefabInternal: {fileID: 0} 211 | m_GameObject: {fileID: 534669902} 212 | m_Enabled: 1 213 | serializedVersion: 2 214 | m_ClearFlags: 1 215 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 216 | m_projectionMatrixMode: 1 217 | m_SensorSize: {x: 36, y: 24} 218 | m_LensShift: {x: 0, y: 0} 219 | m_FocalLength: 50 220 | m_NormalizedViewPortRect: 221 | serializedVersion: 2 222 | x: 0 223 | y: 0 224 | width: 1 225 | height: 1 226 | near clip plane: 0.3 227 | far clip plane: 1000 228 | field of view: 60 229 | orthographic: 0 230 | orthographic size: 5 231 | m_Depth: -1 232 | m_CullingMask: 233 | serializedVersion: 2 234 | m_Bits: 4294967295 235 | m_RenderingPath: -1 236 | m_TargetTexture: {fileID: 0} 237 | m_TargetDisplay: 0 238 | m_TargetEye: 3 239 | m_HDR: 1 240 | m_AllowMSAA: 1 241 | m_AllowDynamicResolution: 0 242 | m_ForceIntoRT: 0 243 | m_OcclusionCulling: 1 244 | m_StereoConvergence: 10 245 | m_StereoSeparation: 0.022 246 | --- !u!4 &534669905 247 | Transform: 248 | m_ObjectHideFlags: 0 249 | m_CorrespondingSourceObject: {fileID: 0} 250 | m_PrefabInternal: {fileID: 0} 251 | m_GameObject: {fileID: 534669902} 252 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 253 | m_LocalPosition: {x: 0, y: 1, z: -10} 254 | m_LocalScale: {x: 1, y: 1, z: 1} 255 | m_Children: [] 256 | m_Father: {fileID: 0} 257 | m_RootOrder: 0 258 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 259 | -------------------------------------------------------------------------------- /Assets/Scenes/SampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2e768c98e9cc1484287833cbcba08d24 3 | folderAsset: yes 4 | timeCreated: 1501053360 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f763576ab2284545afd81a72cdc399a 3 | folderAsset: yes 4 | timeCreated: 1495697624 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/EditorGUIExt.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System; 5 | using UnityEditor; 6 | 7 | namespace DMTimeArea 8 | { 9 | public class EditorGUIExt 10 | { 11 | private class Styles 12 | { 13 | public GUIStyle selectionRect = "SelectionRect"; 14 | } 15 | 16 | private class MinMaxSliderState 17 | { 18 | public float dragStartPos = 0f; 19 | public float dragStartValue = 0f; 20 | public float dragStartSize = 0f; 21 | public float dragStartValuesPerPixel = 0f; 22 | public float dragStartLimit = 0f; 23 | public float dragEndLimit = 0f; 24 | public int whereWeDrag = -1; 25 | } 26 | private enum DragSelectionState 27 | { 28 | None, 29 | DragSelecting, 30 | Dragging 31 | } 32 | private static EditorGUIExt.Styles ms_Styles = new EditorGUIExt.Styles(); 33 | private static int repeatButtonHash = "repeatButton".GetHashCode(); 34 | private static float nextScrollStepTime = 0f; 35 | private static int firstScrollWait = 250; 36 | private static int scrollWait = 30; 37 | private static int scrollControlID; 38 | private static EditorGUIExt.MinMaxSliderState s_MinMaxSliderState; 39 | private static int kFirstScrollWait = 250; 40 | private static int kScrollWait = 30; 41 | private static DateTime s_NextScrollStepTime = DateTime.Now; 42 | private static Vector2 s_MouseDownPos = Vector2.zero; 43 | private static EditorGUIExt.DragSelectionState s_MultiSelectDragSelection = EditorGUIExt.DragSelectionState.None; 44 | private static Vector2 s_StartSelectPos = Vector2.zero; 45 | private static List s_SelectionBackup = null; 46 | private static List s_LastFrameSelections = null; 47 | internal static int s_MinMaxSliderHash = "MinMaxSlider".GetHashCode(); 48 | private static bool adding = false; 49 | private static bool[] initSelections; 50 | private static int initIndex = 0; 51 | private static bool DoRepeatButton(Rect position, GUIContent content, GUIStyle style, FocusType focusType) 52 | { 53 | int controlID = GUIUtility.GetControlID(EditorGUIExt.repeatButtonHash, focusType, position); 54 | EventType typeForControl = Event.current.GetTypeForControl(controlID); 55 | bool result; 56 | if (typeForControl != EventType.MouseDown) 57 | { 58 | if (typeForControl != EventType.MouseUp) 59 | { 60 | if (typeForControl != EventType.Repaint) 61 | { 62 | result = false; 63 | } 64 | else 65 | { 66 | style.Draw(position, content, controlID); 67 | result = (controlID == GUIUtility.hotControl && position.Contains(Event.current.mousePosition)); 68 | } 69 | } 70 | else 71 | { 72 | if (GUIUtility.hotControl == controlID) 73 | { 74 | GUIUtility.hotControl = 0; 75 | Event.current.Use(); 76 | result = position.Contains(Event.current.mousePosition); 77 | } 78 | else 79 | { 80 | result = false; 81 | } 82 | } 83 | } 84 | else 85 | { 86 | if (position.Contains(Event.current.mousePosition)) 87 | { 88 | GUIUtility.hotControl = controlID; 89 | Event.current.Use(); 90 | } 91 | result = false; 92 | } 93 | return result; 94 | } 95 | private static bool ScrollerRepeatButton(int scrollerID, Rect rect, GUIStyle style) 96 | { 97 | bool result = false; 98 | if (EditorGUIExt.DoRepeatButton(rect, GUIContent.none, style, FocusType.Passive)) 99 | { 100 | bool flag = EditorGUIExt.scrollControlID != scrollerID; 101 | EditorGUIExt.scrollControlID = scrollerID; 102 | if (flag) 103 | { 104 | result = true; 105 | EditorGUIExt.nextScrollStepTime = Time.realtimeSinceStartup + 0.001f * (float)EditorGUIExt.firstScrollWait; 106 | } 107 | else 108 | { 109 | if (Time.realtimeSinceStartup >= EditorGUIExt.nextScrollStepTime) 110 | { 111 | result = true; 112 | EditorGUIExt.nextScrollStepTime = Time.realtimeSinceStartup + 0.001f * (float)EditorGUIExt.scrollWait; 113 | } 114 | } 115 | if (Event.current.type == EventType.Repaint) 116 | { 117 | HandleUtility.Repaint(); 118 | } 119 | } 120 | return result; 121 | } 122 | public static void MinMaxScroller(Rect position, int id, ref float value, ref float size, float visualStart, float visualEnd, float startLimit, float endLimit, GUIStyle slider, GUIStyle thumb, GUIStyle leftButton, GUIStyle rightButton, bool horiz) 123 | { 124 | float num; 125 | if (horiz) 126 | { 127 | num = size * 10f / position.width; 128 | } 129 | else 130 | { 131 | num = size * 10f / position.height; 132 | } 133 | Rect position2; 134 | Rect rect; 135 | Rect rect2; 136 | if (horiz) 137 | { 138 | position2 = new Rect(position.x + leftButton.fixedWidth, position.y, position.width - leftButton.fixedWidth - rightButton.fixedWidth, position.height); 139 | rect = new Rect(position.x, position.y, leftButton.fixedWidth, position.height); 140 | rect2 = new Rect(position.xMax - rightButton.fixedWidth, position.y, rightButton.fixedWidth, position.height); 141 | } 142 | else 143 | { 144 | position2 = new Rect(position.x, position.y + leftButton.fixedHeight, position.width, position.height - leftButton.fixedHeight - rightButton.fixedHeight); 145 | rect = new Rect(position.x, position.y, position.width, leftButton.fixedHeight); 146 | rect2 = new Rect(position.x, position.yMax - rightButton.fixedHeight, position.width, rightButton.fixedHeight); 147 | } 148 | float num2 = Mathf.Min(visualStart, value); 149 | float num3 = Mathf.Max(visualEnd, value + size); 150 | EditorGUIExt.MinMaxSlider(position2, ref value, ref size, num2, num3, num2, num3, slider, thumb, horiz); 151 | bool flag = false; 152 | if (Event.current.type == EventType.MouseUp) 153 | { 154 | flag = true; 155 | } 156 | if (EditorGUIExt.ScrollerRepeatButton(id, rect, leftButton)) 157 | { 158 | value -= num * ((visualStart >= visualEnd) ? -1f : 1f); 159 | } 160 | if (EditorGUIExt.ScrollerRepeatButton(id, rect2, rightButton)) 161 | { 162 | value += num * ((visualStart >= visualEnd) ? -1f : 1f); 163 | } 164 | if (flag && Event.current.type == EventType.Used) 165 | { 166 | EditorGUIExt.scrollControlID = 0; 167 | } 168 | if (startLimit < endLimit) 169 | { 170 | value = Mathf.Clamp(value, startLimit, endLimit - size); 171 | } 172 | else 173 | { 174 | value = Mathf.Clamp(value, endLimit, startLimit - size); 175 | } 176 | } 177 | public static void MinMaxSlider(Rect position, ref float value, ref float size, float visualStart, float visualEnd, float startLimit, float endLimit, GUIStyle slider, GUIStyle thumb, bool horiz) 178 | { 179 | EditorGUIExt.DoMinMaxSlider(position, GUIUtility.GetControlID(EditorGUIExt.s_MinMaxSliderHash, FocusType.Passive), ref value, ref size, visualStart, visualEnd, startLimit, endLimit, slider, thumb, horiz); 180 | } 181 | internal static void DoMinMaxSlider(Rect position, int id, ref float value, ref float size, float visualStart, float visualEnd, float startLimit, float endLimit, GUIStyle slider, GUIStyle thumb, bool horiz) 182 | { 183 | Event current = Event.current; 184 | bool flag = size == 0f; 185 | float num = Mathf.Min(visualStart, visualEnd); 186 | float num2 = Mathf.Max(visualStart, visualEnd); 187 | float num3 = Mathf.Min(startLimit, endLimit); 188 | float num4 = Mathf.Max(startLimit, endLimit); 189 | EditorGUIExt.MinMaxSliderState minMaxSliderState = EditorGUIExt.s_MinMaxSliderState; 190 | if (GUIUtility.hotControl == id && minMaxSliderState != null) 191 | { 192 | num = minMaxSliderState.dragStartLimit; 193 | num3 = minMaxSliderState.dragStartLimit; 194 | num2 = minMaxSliderState.dragEndLimit; 195 | num4 = minMaxSliderState.dragEndLimit; 196 | } 197 | float num5 = 0f; 198 | float num6 = Mathf.Clamp(value, num, num2); 199 | float num7 = Mathf.Clamp(value + size, num, num2) - num6; 200 | float num8 = (float)((visualStart <= visualEnd) ? 1 : -1); 201 | if (slider != null && thumb != null) 202 | { 203 | float num10; 204 | Rect position2; 205 | Rect rect; 206 | Rect rect2; 207 | float num11; 208 | if (horiz) 209 | { 210 | float num9 = (thumb.fixedWidth == 0f) ? ((float)thumb.padding.horizontal) : thumb.fixedWidth; 211 | num10 = (position.width - (float)slider.padding.horizontal - num9) / (num2 - num); 212 | position2 = new Rect((num6 - num) * num10 + position.x + (float)slider.padding.left, position.y + (float)slider.padding.top, num7 * num10 + num9, position.height - (float)slider.padding.vertical); 213 | rect = new Rect(position2.x, position2.y, (float)thumb.padding.left, position2.height); 214 | rect2 = new Rect(position2.xMax - (float)thumb.padding.right, position2.y, (float)thumb.padding.right, position2.height); 215 | num11 = current.mousePosition.x - position.x; 216 | } 217 | else 218 | { 219 | float num12 = (thumb.fixedHeight == 0f) ? ((float)thumb.padding.vertical) : thumb.fixedHeight; 220 | num10 = (position.height - (float)slider.padding.vertical - num12) / (num2 - num); 221 | position2 = new Rect(position.x + (float)slider.padding.left, (num6 - num) * num10 + position.y + (float)slider.padding.top, position.width - (float)slider.padding.horizontal, num7 * num10 + num12); 222 | rect = new Rect(position2.x, position2.y, position2.width, (float)thumb.padding.top); 223 | rect2 = new Rect(position2.x, position2.yMax - (float)thumb.padding.bottom, position2.width, (float)thumb.padding.bottom); 224 | num11 = current.mousePosition.y - position.y; 225 | } 226 | switch (current.GetTypeForControl(id)) 227 | { 228 | case EventType.MouseDown: 229 | if (position.Contains(current.mousePosition) && num - num2 != 0f) 230 | { 231 | if (minMaxSliderState == null) 232 | { 233 | minMaxSliderState = (EditorGUIExt.s_MinMaxSliderState = new EditorGUIExt.MinMaxSliderState()); 234 | } 235 | minMaxSliderState.dragStartLimit = startLimit; 236 | minMaxSliderState.dragEndLimit = endLimit; 237 | if (position2.Contains(current.mousePosition)) 238 | { 239 | minMaxSliderState.dragStartPos = num11; 240 | minMaxSliderState.dragStartValue = value; 241 | minMaxSliderState.dragStartSize = size; 242 | minMaxSliderState.dragStartValuesPerPixel = num10; 243 | if (rect.Contains(current.mousePosition)) 244 | { 245 | minMaxSliderState.whereWeDrag = 1; 246 | } 247 | else 248 | { 249 | if (rect2.Contains(current.mousePosition)) 250 | { 251 | minMaxSliderState.whereWeDrag = 2; 252 | } 253 | else 254 | { 255 | minMaxSliderState.whereWeDrag = 0; 256 | } 257 | } 258 | GUIUtility.hotControl = id; 259 | current.Use(); 260 | } 261 | else 262 | { 263 | if (slider != GUIStyle.none) 264 | { 265 | if (size != 0f && flag) 266 | { 267 | if (horiz) 268 | { 269 | if (num11 > position2.xMax - position.x) 270 | { 271 | value += size * num8 * 0.9f; 272 | } 273 | else 274 | { 275 | value -= size * num8 * 0.9f; 276 | } 277 | } 278 | else 279 | { 280 | if (num11 > position2.yMax - position.y) 281 | { 282 | value += size * num8 * 0.9f; 283 | } 284 | else 285 | { 286 | value -= size * num8 * 0.9f; 287 | } 288 | } 289 | minMaxSliderState.whereWeDrag = 0; 290 | GUI.changed = true; 291 | EditorGUIExt.s_NextScrollStepTime = DateTime.Now.AddMilliseconds((double)EditorGUIExt.kFirstScrollWait); 292 | float num13 = (!horiz) ? current.mousePosition.y : current.mousePosition.x; 293 | float num14 = (!horiz) ? position2.y : position2.x; 294 | minMaxSliderState.whereWeDrag = ((num13 <= num14) ? 3 : 4); 295 | } 296 | else 297 | { 298 | if (horiz) 299 | { 300 | value = (num11 - position2.width * 0.5f) / num10 + num - size * 0.5f; 301 | } 302 | else 303 | { 304 | value = (num11 - position2.height * 0.5f) / num10 + num - size * 0.5f; 305 | } 306 | minMaxSliderState.dragStartPos = num11; 307 | minMaxSliderState.dragStartValue = value; 308 | minMaxSliderState.dragStartSize = size; 309 | minMaxSliderState.dragStartValuesPerPixel = num10; 310 | minMaxSliderState.whereWeDrag = 0; 311 | GUI.changed = true; 312 | } 313 | GUIUtility.hotControl = id; 314 | value = Mathf.Clamp(value, num3, num4 - size); 315 | current.Use(); 316 | } 317 | } 318 | } 319 | break; 320 | case EventType.MouseUp: 321 | if (GUIUtility.hotControl == id) 322 | { 323 | current.Use(); 324 | GUIUtility.hotControl = 0; 325 | } 326 | break; 327 | case EventType.MouseDrag: 328 | if (GUIUtility.hotControl == id) 329 | { 330 | float num15 = (num11 - minMaxSliderState.dragStartPos) / minMaxSliderState.dragStartValuesPerPixel; 331 | int whereWeDrag = minMaxSliderState.whereWeDrag; 332 | if (whereWeDrag != 0) 333 | { 334 | if (whereWeDrag != 1) 335 | { 336 | if (whereWeDrag == 2) 337 | { 338 | size = minMaxSliderState.dragStartSize + num15; 339 | if (value + size > num4) 340 | { 341 | size = num4 - value; 342 | } 343 | if (size < num5) 344 | { 345 | size = num5; 346 | } 347 | } 348 | } 349 | else 350 | { 351 | value = minMaxSliderState.dragStartValue + num15; 352 | size = minMaxSliderState.dragStartSize - num15; 353 | if (value < num3) 354 | { 355 | size -= num3 - value; 356 | value = num3; 357 | } 358 | if (size < num5) 359 | { 360 | value -= num5 - size; 361 | size = num5; 362 | } 363 | } 364 | } 365 | else 366 | { 367 | value = Mathf.Clamp(minMaxSliderState.dragStartValue + num15, num3, num4 - size); 368 | } 369 | GUI.changed = true; 370 | current.Use(); 371 | } 372 | break; 373 | case EventType.Repaint: 374 | slider.Draw(position, GUIContent.none, id); 375 | thumb.Draw(position2, GUIContent.none, id); 376 | if (GUIUtility.hotControl == id && position.Contains(current.mousePosition) && num - num2 != 0f) 377 | { 378 | if (position2.Contains(current.mousePosition)) 379 | { 380 | if (minMaxSliderState != null && (minMaxSliderState.whereWeDrag == 3 || minMaxSliderState.whereWeDrag == 4)) 381 | { 382 | GUIUtility.hotControl = 0; 383 | } 384 | } 385 | else 386 | { 387 | if (!(DateTime.Now < EditorGUIExt.s_NextScrollStepTime)) 388 | { 389 | float num13 = (!horiz) ? current.mousePosition.y : current.mousePosition.x; 390 | float num14 = (!horiz) ? position2.y : position2.x; 391 | int num16 = (num13 <= num14) ? 3 : 4; 392 | if (num16 == minMaxSliderState.whereWeDrag) 393 | { 394 | if (size != 0f && flag) 395 | { 396 | if (horiz) 397 | { 398 | if (num11 > position2.xMax - position.x) 399 | { 400 | value += size * num8 * 0.9f; 401 | } 402 | else 403 | { 404 | value -= size * num8 * 0.9f; 405 | } 406 | } 407 | else 408 | { 409 | if (num11 > position2.yMax - position.y) 410 | { 411 | value += size * num8 * 0.9f; 412 | } 413 | else 414 | { 415 | value -= size * num8 * 0.9f; 416 | } 417 | } 418 | minMaxSliderState.whereWeDrag = -1; 419 | GUI.changed = true; 420 | } 421 | value = Mathf.Clamp(value, num3, num4 - size); 422 | EditorGUIExt.s_NextScrollStepTime = DateTime.Now.AddMilliseconds((double)EditorGUIExt.kScrollWait); 423 | } 424 | } 425 | } 426 | } 427 | break; 428 | } 429 | } 430 | } 431 | public static bool DragSelection(Rect[] positions, ref bool[] selections, GUIStyle style) 432 | { 433 | int controlID = GUIUtility.GetControlID(34553287, FocusType.Keyboard); 434 | Event current = Event.current; 435 | int num = -1; 436 | for (int i = positions.Length - 1; i >= 0; i--) 437 | { 438 | if (positions[i].Contains(current.mousePosition)) 439 | { 440 | num = i; 441 | break; 442 | } 443 | } 444 | bool result; 445 | switch (current.GetTypeForControl(controlID)) 446 | { 447 | case EventType.MouseDown: 448 | if (current.button == 0 && num >= 0) 449 | { 450 | GUIUtility.keyboardControl = 0; 451 | bool flag = false; 452 | if (selections[num]) 453 | { 454 | int num2 = 0; 455 | bool[] array = selections; 456 | for (int j = 0; j < array.Length; j++) 457 | { 458 | bool flag2 = array[j]; 459 | if (flag2) 460 | { 461 | num2++; 462 | if (num2 > 1) 463 | { 464 | break; 465 | } 466 | } 467 | } 468 | if (num2 == 1) 469 | { 470 | flag = true; 471 | } 472 | } 473 | if (!current.shift && !EditorGUI.actionKey) 474 | { 475 | for (int k = 0; k < positions.Length; k++) 476 | { 477 | selections[k] = false; 478 | } 479 | } 480 | EditorGUIExt.initIndex = num; 481 | EditorGUIExt.initSelections = (bool[])selections.Clone(); 482 | EditorGUIExt.adding = true; 483 | if ((current.shift || EditorGUI.actionKey) && selections[num]) 484 | { 485 | EditorGUIExt.adding = false; 486 | } 487 | selections[num] = (!flag && EditorGUIExt.adding); 488 | GUIUtility.hotControl = controlID; 489 | current.Use(); 490 | result = true; 491 | return result; 492 | } 493 | break; 494 | case EventType.MouseUp: 495 | if (GUIUtility.hotControl == controlID) 496 | { 497 | GUIUtility.hotControl = 0; 498 | } 499 | break; 500 | case EventType.MouseDrag: 501 | if (GUIUtility.hotControl == controlID) 502 | { 503 | if (current.button == 0) 504 | { 505 | if (num < 0) 506 | { 507 | Rect rect = new Rect(positions[0].x, positions[0].y - 200f, positions[0].width, 200f); 508 | if (rect.Contains(current.mousePosition)) 509 | { 510 | num = 0; 511 | } 512 | rect.y = positions[positions.Length - 1].yMax; 513 | if (rect.Contains(current.mousePosition)) 514 | { 515 | num = selections.Length - 1; 516 | } 517 | } 518 | if (num < 0) 519 | { 520 | result = false; 521 | return result; 522 | } 523 | int num3 = Mathf.Min(EditorGUIExt.initIndex, num); 524 | int num4 = Mathf.Max(EditorGUIExt.initIndex, num); 525 | for (int l = 0; l < selections.Length; l++) 526 | { 527 | if (l >= num3 && l <= num4) 528 | { 529 | selections[l] = EditorGUIExt.adding; 530 | } 531 | else 532 | { 533 | selections[l] = EditorGUIExt.initSelections[l]; 534 | } 535 | } 536 | current.Use(); 537 | result = true; 538 | return result; 539 | } 540 | } 541 | break; 542 | case EventType.Repaint: 543 | for (int m = 0; m < positions.Length; m++) 544 | { 545 | style.Draw(positions[m], GUIContent.none, controlID, selections[m]); 546 | } 547 | break; 548 | } 549 | result = false; 550 | return result; 551 | } 552 | private static bool Any(bool[] selections) 553 | { 554 | bool result; 555 | for (int i = 0; i < selections.Length; i++) 556 | { 557 | if (selections[i]) 558 | { 559 | result = true; 560 | return result; 561 | } 562 | } 563 | result = false; 564 | return result; 565 | } 566 | private static int GetIndexUnderMouse(Rect[] hitPositions, bool[] readOnly) 567 | { 568 | Vector2 mousePosition = Event.current.mousePosition; 569 | int result; 570 | for (int i = hitPositions.Length - 1; i >= 0; i--) 571 | { 572 | if ((readOnly == null || !readOnly[i]) && hitPositions[i].Contains(mousePosition)) 573 | { 574 | result = i; 575 | return result; 576 | } 577 | } 578 | result = -1; 579 | return result; 580 | } 581 | internal static Rect FromToRect(Vector2 start, Vector2 end) 582 | { 583 | Rect result = new Rect(start.x, start.y, end.x - start.x, end.y - start.y); 584 | if (result.width < 0f) 585 | { 586 | result.x += result.width; 587 | result.width = -result.width; 588 | } 589 | if (result.height < 0f) 590 | { 591 | result.y += result.height; 592 | result.height = -result.height; 593 | } 594 | return result; 595 | } 596 | } 597 | } 598 | 599 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/EditorGUIExt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6858516ceccdec84abd707c9bd73e056 3 | timeCreated: 1495765291 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/ExampleTimeLine.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using DMTimeArea; 6 | using System; 7 | 8 | public class ExampleTimeLine : SimpleTimeArea 9 | { 10 | private Rect rectTotalArea; 11 | private Rect rectContent; 12 | private Rect rectTimeRuler; 13 | 14 | private Rect rectTopBar; 15 | private Rect rectLeft; 16 | public Rect rectLeftTopToolBar; 17 | 18 | public AnimationCurve m_AnimationCurve; 19 | 20 | private float _lastUpdateTime = 0f; 21 | #region Used 22 | private double runningTime = 10.0f; 23 | protected override double RunningTime 24 | { 25 | get { return runningTime; } 26 | set 27 | { 28 | runningTime = value; 29 | } 30 | } 31 | 32 | private static double cutOffTime = 15.0f; 33 | protected override double CutOffTime 34 | { 35 | get { return cutOffTime; } 36 | set 37 | { 38 | cutOffTime = value; 39 | } 40 | } 41 | 42 | private float LEFTWIDTH = 250f; 43 | 44 | public bool IsPlaying 45 | { 46 | get; 47 | set; 48 | } 49 | 50 | protected override bool IsLockedMoveFrame 51 | { 52 | get { return (IsPlaying || Application.isPlaying); } 53 | } 54 | 55 | protected override bool IsLockDragHeaderArrow 56 | { 57 | get { return IsPlaying; } 58 | } 59 | 60 | public override Rect _rectTimeAreaTotal 61 | { 62 | get { return rectTotalArea; } 63 | } 64 | 65 | public override Rect _rectTimeAreaContent 66 | { 67 | get { return rectContent; } 68 | } 69 | 70 | public override Rect _rectTimeAreaRuler 71 | { 72 | get { return rectTimeRuler; } 73 | } 74 | 75 | protected override float sequencerHeaderWidth 76 | { 77 | get { return LEFTWIDTH; } 78 | } 79 | 80 | #endregion 81 | 82 | [MenuItem("Window/ExampleTimeLineWindow", false, 2002)] 83 | public static void DoWindow() 84 | { 85 | var window = GetWindow(false, "ExampleTimeLine"); 86 | window.minSize = new Vector3(400f, 200f); 87 | window.Show(); 88 | } 89 | 90 | private void OnEnable() 91 | { 92 | EditorApplication.update = (EditorApplication.CallbackFunction)System.Delegate.Combine(EditorApplication.update, new EditorApplication.CallbackFunction(OnEditorUpdate)); 93 | _lastUpdateTime = (float)EditorApplication.timeSinceStartup; 94 | } 95 | 96 | private void OnDisable() 97 | { 98 | EditorApplication.update = (EditorApplication.CallbackFunction)System.Delegate.Remove(EditorApplication.update, new EditorApplication.CallbackFunction(OnEditorUpdate)); 99 | } 100 | 101 | private void OnEditorUpdate() 102 | { 103 | // float delta = (float)(EditorApplication.timeSinceStartup - _lastUpdateTime); 104 | if (!Application.isPlaying && this.IsPlaying) 105 | { 106 | double fTime = (float)EditorApplication.timeSinceStartup - _lastUpdateTime; 107 | this.RunningTime += Math.Abs(fTime) * 1.0f; 108 | if (this.RunningTime >= this.CutOffTime) 109 | { 110 | this.PausePreView(); 111 | } 112 | } 113 | //if (_simpleSample) 114 | // BlendCenter.BlendAnimation((float)this.RunningTime, aa01, aa02, _targetObject); 115 | 116 | _lastUpdateTime = (float)EditorApplication.timeSinceStartup; 117 | Repaint(); 118 | } 119 | 120 | private void OnGUI() 121 | { 122 | Rect rectMainBodyArea = new Rect(0, toolbarHeight, base.position.width, this.position.height - toolbarHeight); 123 | rectTopBar = new Rect(0, 0, this.position.width, toolbarHeight); 124 | rectLeft = new Rect(rectMainBodyArea.x, rectMainBodyArea.y + timeRulerHeight, LEFTWIDTH, rectMainBodyArea.height); 125 | rectLeftTopToolBar = new Rect(rectMainBodyArea.x, rectMainBodyArea.y, LEFTWIDTH, timeRulerHeight); 126 | 127 | rectTotalArea = new Rect(rectMainBodyArea.x + LEFTWIDTH, rectMainBodyArea.y, base.position.width - LEFTWIDTH, rectMainBodyArea.height); 128 | rectTimeRuler = new Rect(rectMainBodyArea.x + LEFTWIDTH, rectMainBodyArea.y, base.position.width - LEFTWIDTH, timeRulerHeight); 129 | rectContent = new Rect(rectMainBodyArea.x + LEFTWIDTH, rectMainBodyArea.y + timeRulerHeight, base.position.width - LEFTWIDTH, rectMainBodyArea.height - timeRulerHeight); 130 | 131 | InitTimeArea(false, false, true, true); 132 | DrawTimeAreaBackGround(); 133 | OnTimeRulerCursorAndCutOffCursorInput(); 134 | DrawTimeRulerArea(); 135 | 136 | // Draw your top bar 137 | DrawTopToolBar(); 138 | // Draw left content 139 | DrawLeftContent(); 140 | // Draw your left tool bar 141 | DrawLeftTopToolBar(); 142 | 143 | GUILayout.BeginArea(rectContent); 144 | DrawCurveLine(rectTotalArea.x); 145 | 146 | GUILayout.EndArea(); 147 | } 148 | 149 | 150 | protected override void DrawVerticalTickLine() 151 | { 152 | Color preColor = Handles.color; 153 | Color color = Color.white; 154 | color.a = 0.3f; 155 | Handles.color = color; 156 | // draw vertical ticks 157 | float step = 10; 158 | float preStep = GetTimeArea.drawRect.height / 20f; 159 | // step = GetTimeArea.drawRect.y; 160 | step = 0f; 161 | while (step <= GetTimeArea.drawRect.height + GetTimeArea.drawRect.y) 162 | { 163 | Vector2 pos = new Vector2(rectContent.x, step + GetTimeArea.drawRect.y); 164 | Vector2 endPos = new Vector2(position.width, step + GetTimeArea.drawRect.y); 165 | step += preStep; 166 | float height = PixelToY(step); 167 | Rect rect = new Rect(rectContent.x + 5f, step - 10f + GetTimeArea.drawRect.y, 100f, 20f); 168 | GUI.Label(rect, height.ToString("0")); 169 | Handles.DrawLine(pos, endPos); 170 | } 171 | Handles.color = preColor; 172 | } 173 | 174 | protected virtual void DrawLeftContent() 175 | { 176 | GUILayout.BeginArea(rectLeft); 177 | GUILayout.Label("Draw your left content"); 178 | if (m_AnimationCurve == null) 179 | m_AnimationCurve = new AnimationCurve(); 180 | m_AnimationCurve = EditorGUILayout.CurveField("Target Curve", m_AnimationCurve); 181 | GUILayout.EndArea(); 182 | } 183 | 184 | protected virtual void DrawTopToolBar() 185 | { 186 | GUILayout.BeginArea(rectTopBar); 187 | Rect rect = new Rect(rectTopBar.width - 32, rectTopBar.y, 30, 30); 188 | if (!Application.isPlaying && GUI.Button(rect, ResManager.SettingIcon, EditorStyles.toolbarDropDown)) 189 | { 190 | OnClickSettingButton(); 191 | } 192 | GUILayout.EndArea(); 193 | } 194 | 195 | private void DrawLeftTopToolBar() 196 | { 197 | // left top tool bar 198 | GUILayout.BeginArea(rectLeftTopToolBar, string.Empty, EditorStyles.toolbarButton); 199 | GUILayout.BeginHorizontal(); 200 | 201 | if (GUILayout.Button(ResManager.prevKeyContent, EditorStyles.toolbarButton, GUILayout.ExpandWidth(false))) 202 | { 203 | PreviousTimeFrame(); 204 | } 205 | 206 | bool playing = IsPlaying; 207 | playing = GUILayout.Toggle(playing, ResManager.playContent, EditorStyles.toolbarButton, new GUILayoutOption[0]); 208 | if (!Application.isPlaying) 209 | { 210 | if (IsPlaying != playing) 211 | { 212 | IsPlaying = playing; 213 | if (IsPlaying) 214 | PlayPreview(); 215 | else 216 | PausePreView(); 217 | } 218 | } 219 | 220 | if (GUILayout.Button(ResManager.nextKeyContent, EditorStyles.toolbarButton, GUILayout.ExpandWidth(false))) 221 | { 222 | NextTimeFrame(); 223 | } 224 | 225 | if (GUILayout.Button(ResManager.StopIcon, EditorStyles.toolbarButton, GUILayout.ExpandWidth(false)) 226 | && !Application.isPlaying) 227 | { 228 | PausePreView(); 229 | this.RunningTime = 0.0f; 230 | } 231 | 232 | GUILayout.FlexibleSpace(); 233 | string timeStr = TimeAsString((double)this.RunningTime, "F2"); 234 | GUILayout.Label(timeStr); 235 | GUILayout.EndHorizontal(); 236 | GUILayout.EndArea(); 237 | } 238 | 239 | private void PlayPreview() 240 | { 241 | IsPlaying = true; 242 | } 243 | 244 | private void PausePreView() 245 | { 246 | IsPlaying = false; 247 | } 248 | 249 | private void DrawCurveLine(float offsetX) 250 | { 251 | // draw curve 252 | Keyframe[] keys = m_AnimationCurve.keys; 253 | int keyCount = keys.Length; 254 | if (keyCount > 1) 255 | { 256 | //Keyframe startKey = keys[0]; 257 | //Keyframe endKey = keys[keyCount - 1]; 258 | m_cachePoints.Clear(); 259 | m_segmentResolution = Mathf.Clamp(m_segmentResolution, 3, 50); 260 | for (int i = 0; i < keyCount - 1; i++) 261 | { 262 | Keyframe cur = keys[i]; 263 | Keyframe next = keys[i + 1]; 264 | 265 | m_cachePoints.Add(new Vector3(cur.time, cur.value)); 266 | float num = Mathf.Lerp(cur.time, next.time, 0.001f / (float)m_segmentResolution); 267 | m_cachePoints.Add(new Vector3(num, m_AnimationCurve.Evaluate(num))); 268 | 269 | for (float num2 = 1f; num2 < (float)m_segmentResolution; num2 += 1f) 270 | { 271 | num = Mathf.Lerp(cur.time, next.time, num2 / (float)m_segmentResolution); 272 | m_cachePoints.Add(new Vector3(num, m_AnimationCurve.Evaluate(num))); 273 | } 274 | num = Mathf.Lerp(cur.time, next.time, 1f - 0.000f / (float)m_segmentResolution); 275 | m_cachePoints.Add(new Vector3(num, m_AnimationCurve.Evaluate(num))); 276 | m_cachePoints.Add(new Vector3(next.time, next.value)); 277 | } 278 | 279 | for (int i = 0; i < m_cachePoints.Count; i++) 280 | { 281 | float time = m_cachePoints[i].x; 282 | float value = m_cachePoints[i].y; 283 | time = TimeToPixel((double)time) - offsetX; 284 | value = YToPixel(value); 285 | 286 | Vector2 pos = new Vector2(time, value); 287 | m_cachePoints[i] = pos; 288 | } 289 | if (m_cachePoints.Count != 0) 290 | { 291 | Handles.BeginGUI(); 292 | Handles.color = Color.white; 293 | Handles.DrawAAPolyLine(3, m_cachePoints.ToArray()); 294 | Handles.EndGUI(); 295 | } 296 | 297 | keys = m_AnimationCurve.keys; 298 | for (int i = 0; i < keys.Length; i++) 299 | { 300 | float time = keys[i].time; 301 | float value = keys[i].value; 302 | int iconWidth = 12; 303 | value = YToPixel(value); 304 | time = TimeToPixel((double)time) - offsetX; 305 | Vector2 pos = new Vector2(time, value); 306 | 307 | Rect rect = new Rect(pos.x - iconWidth * 0.5f, pos.y - iconWidth * 0.5f, iconWidth, iconWidth); 308 | if (iconTexture == null) 309 | iconTexture = EditorGUIUtility.IconContent("Animation.Record", "|Enable/disable keyframe recording mode.").image; 310 | GUI.DrawTexture(rect, iconTexture); 311 | } 312 | } 313 | } 314 | private List m_cachePoints = new List(); 315 | public int m_segmentResolution = 20; 316 | private static Texture iconTexture = null; 317 | } 318 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/ExampleTimeLine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e5cef2b45ea430e41b5283b280acc0bf 3 | timeCreated: 1502869445 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/ResManager.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | 6 | namespace DMTimeArea 7 | { 8 | public class ResManager 9 | { 10 | public static GUIContent playContent = EditorGUIUtility.IconContent("Animation.Play", "|Play the Current active Shot."); 11 | public static GUIContent recordContent = EditorGUIUtility.IconContent("Animation.Record", "|Enable/disable keyframe recording mode."); 12 | public static GUIContent prevKeyContent = EditorGUIUtility.IconContent("Animation.PrevKey", "|Go to previous keyframe."); 13 | public static GUIContent nextKeyContent = EditorGUIUtility.IconContent("Animation.NextKey", "|Go to next keyframe."); 14 | public static GUIContent firstKeyContent = EditorGUIUtility.IconContent("Animation.FirstKey", "|Go to the beginning of the active Shot."); 15 | public static GUIContent lastKeyContent = EditorGUIUtility.IconContent("Animation.LastKey", "|Go to the end of the active Shot."); 16 | 17 | private static Texture _stopIcon; 18 | public static Texture StopIcon 19 | { 20 | get 21 | { 22 | if (_stopIcon == null) 23 | { 24 | _stopIcon = (EditorGUIUtility.Load("Assets/SimpleTimeLineWindow/EditorResources/StopIcon.png") as Texture); 25 | } 26 | return _stopIcon; 27 | } 28 | } 29 | 30 | private static Texture _settingIcon; 31 | public static Texture SettingIcon 32 | { 33 | get 34 | { 35 | if (_settingIcon == null) 36 | { 37 | _settingIcon = (EditorGUIUtility.Load("Assets/SimpleTimeLineWindow/EditorResources/SettingsIcon.png") as Texture); 38 | } 39 | return _settingIcon; 40 | } 41 | } 42 | 43 | private static Texture _cutOffGuideLine; 44 | private static Texture _timeHead; 45 | public static Texture CutOffGuideLineTexture 46 | { 47 | get 48 | { 49 | if (_cutOffGuideLine == null) 50 | _cutOffGuideLine = (EditorGUIUtility.Load("Assets/SimpleTimeLineWindow/EditorResources/CutOffTimeCursor.png") as Texture); 51 | return _cutOffGuideLine; 52 | } 53 | } 54 | 55 | public static Texture TimeHeadTexture 56 | { 57 | get 58 | { 59 | if (_timeHead == null) 60 | _timeHead = (EditorGUIUtility.Load("Assets/SimpleTimeLineWindow/EditorResources/Timecursor.png") as Texture); 61 | return _timeHead; 62 | } 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/ResManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0db38e78e5d640d43adb1cd33d9f82d3 3 | timeCreated: 1501053845 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/SimpleTimeArea.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System; 5 | using System.Reflection; 6 | using UnityEditor; 7 | using DMTimeArea; 8 | using TimeUtility = DMTimeArea.TimeUtility; 9 | 10 | namespace DMTimeArea 11 | { 12 | public abstract class SimpleTimeArea : EditorWindow 13 | { 14 | protected TimeArea _simpleTimeArea; 15 | public TimeArea GetTimeArea 16 | { 17 | get { return _simpleTimeArea; } 18 | } 19 | private static readonly float kTimeAreaYPosition = 100f; 20 | private static readonly float kTimeAreaHeight = 100f; 21 | private static readonly float kTimeAreaMinWidth = 50f; 22 | 23 | protected const float ARROW_WIDTH = 6f; 24 | protected const int TIMELINETIMELABEL_HEIGHT = 18; 25 | private const int TIMERULER_HEIGHT = 28;// 18; 26 | protected const int HORIZONTALBAR_HEIGHT = 15; 27 | 28 | protected virtual int timeRulerHeight 29 | { 30 | get { return TIMERULER_HEIGHT; } 31 | } 32 | 33 | protected virtual int toolbarHeight 34 | { 35 | get 36 | { 37 | return 18;// origin 18} 38 | } 39 | } 40 | 41 | private bool _dragCurrentTimeArrow = false; 42 | private bool _dragCutOffTimeArrow = false; 43 | 44 | public abstract Rect _rectTimeAreaTotal 45 | { 46 | get; 47 | } 48 | 49 | public abstract Rect _rectTimeAreaContent 50 | { 51 | get; 52 | } 53 | 54 | public abstract Rect _rectTimeAreaRuler 55 | { 56 | get; 57 | } 58 | 59 | protected virtual double RunningTime 60 | { 61 | get { return 0f; } 62 | set { } 63 | } 64 | protected virtual double CutOffTime 65 | { 66 | get { return 0.0; } 67 | set { } 68 | } 69 | 70 | protected abstract bool IsLockedMoveFrame 71 | { 72 | get; 73 | } 74 | 75 | protected abstract bool IsLockDragHeaderArrow 76 | { 77 | get; 78 | } 79 | 80 | protected abstract float sequencerHeaderWidth 81 | { 82 | get; 83 | } 84 | 85 | public Rect _timeAreaBounds 86 | { 87 | get 88 | { 89 | float width = base.position.width - sequencerHeaderWidth; 90 | return new Rect(_rectTimeAreaContent.x, _rectTimeAreaContent.y, Mathf.Max(width, kTimeAreaMinWidth), _rectTimeAreaContent.height); 91 | } 92 | } 93 | 94 | // 95 | // Time Area settings 96 | // 97 | // Frame rate 98 | public float _frameRate = 30f; 99 | // Frame Snap 100 | public bool _frameSnap = true; 101 | // Time ruler format 102 | public bool _timeInFrames = false; 103 | // Edge snap 104 | public bool _edgeSnaps = true; 105 | // Draw helper action line 106 | public bool _drawActionHelperLine = true; 107 | // Helper dot line 108 | // public bool _actionHelperDotLine = true; 109 | 110 | public int RunningFrame 111 | { 112 | get 113 | { 114 | return TimeUtility.ToFrames(this.RunningTime, (double)this._frameRate); 115 | } 116 | set 117 | { 118 | this.RunningTime = (float)TimeUtility.FromFrames(Mathf.Max(0, value), (double)this._frameRate); 119 | } 120 | } 121 | 122 | public void PreviousTimeFrame() 123 | { 124 | if (!IsLockedMoveFrame) 125 | { 126 | this.RunningFrame--; 127 | } 128 | } 129 | 130 | public void NextTimeFrame() 131 | { 132 | if (!IsLockedMoveFrame) 133 | { 134 | this.RunningFrame++; 135 | } 136 | } 137 | 138 | public int CutOffFrame 139 | { 140 | get 141 | { 142 | return TimeUtility.ToFrames(this.CutOffTime, (double)this._frameRate); 143 | } 144 | set 145 | { 146 | this.CutOffTime = (float)TimeUtility.FromFrames(Mathf.Max(0, value), (double)this._frameRate); 147 | } 148 | } 149 | 150 | public Vector2 timeAreaScale 151 | { 152 | get 153 | { 154 | return this._simpleTimeArea.scale; 155 | } 156 | } 157 | 158 | public Vector2 timeAreaTranslation 159 | { 160 | get 161 | { 162 | return this._simpleTimeArea.translation; 163 | } 164 | } 165 | 166 | public Vector2 timeAreaTimeShownRange 167 | { 168 | get 169 | { 170 | float x = PixelToTime(_timeAreaBounds.xMin); 171 | float y = PixelToTime(_timeAreaBounds.xMax); 172 | return new Vector2(x, y); 173 | } 174 | } 175 | 176 | protected virtual void DrawTimeAreaBackGround() 177 | { 178 | GUI.Box(_rectTimeAreaContent, GUIContent.none, new GUIStyle("CurveEditorBackground")); 179 | // EditorGUI.DrawRect(_rectTimeAreaContent, new Color(0.16f, 0.16f, 0.16f, 1f)); 180 | // EditorGUI.DrawRect(_rectTimeAreaContent, DMTimeLineStyles) 181 | _simpleTimeArea.mRect = this._timeAreaBounds; 182 | _simpleTimeArea.BeginViewGUI(); 183 | _simpleTimeArea.SetTickMarkerRanges(); 184 | _simpleTimeArea.DrawMajorTicks(this._rectTimeAreaTotal, (float)_frameRate); 185 | // DrawVerticalTickLine(); 186 | _simpleTimeArea.EndViewGUI(); 187 | 188 | // Mouse Event for zoom area 189 | _simpleTimeArea.OnAreaEvent(); 190 | } 191 | 192 | protected virtual void DrawVerticalTickLine() 193 | { 194 | } 195 | 196 | protected void DrawTimeCodeGUI(bool setBeginTime = true) 197 | { 198 | string text; 199 | if (_simpleTimeArea != null) 200 | { 201 | double time01 = setBeginTime ? this.RunningTime : this.CutOffTime; 202 | text = this.TimeAsString(time01, "F2"); 203 | bool flag = TimeUtility.OnFrameBoundary(time01, (double)this._frameRate); 204 | if (this._timeInFrames) 205 | { 206 | if (flag) 207 | { 208 | text = setBeginTime ? RunningFrame.ToString() : CutOffFrame.ToString(); 209 | } 210 | else 211 | text = TimeUtility.ToExactFrames(time01, (double)this._frameRate).ToString("F2"); 212 | } 213 | } 214 | else 215 | text = "0"; 216 | EditorGUI.BeginChangeCheck(); 217 | string text2 = EditorGUILayout.DelayedTextField(text, EditorStyles.toolbarTextField, new GUILayoutOption[] 218 | { 219 | GUILayout.Width(70f) 220 | }); 221 | 222 | bool flag2 = EditorGUI.EndChangeCheck(); 223 | if (flag2) 224 | { 225 | if (_timeInFrames) 226 | { 227 | int frame = setBeginTime ? RunningFrame : CutOffFrame; 228 | double d = 0.0; 229 | if (double.TryParse(text2, out d)) 230 | frame = Math.Max(0, (int)Math.Floor(d)); 231 | 232 | if (setBeginTime) 233 | RunningFrame = frame; 234 | else 235 | CutOffFrame = frame; 236 | } 237 | else 238 | { 239 | double num = TimeUtility.ParseTimeCode(text2, (double)this._frameRate, -1.0); 240 | if (num > 0.0) 241 | { 242 | if (setBeginTime) 243 | RunningTime = (float)num; 244 | else 245 | CutOffTime = (float)num; 246 | } 247 | } 248 | } 249 | } 250 | 251 | public float TimeToTimeAreaPixel(double time) 252 | { 253 | float num = (float)time; 254 | num *= this.timeAreaScale.x; 255 | return num + (this.timeAreaTranslation.x + this.sequencerHeaderWidth); 256 | } 257 | 258 | public float TimeToScreenSpacePixel(double time) 259 | { 260 | float num = (float)time; 261 | num *= this.timeAreaScale.x; 262 | return num + this.timeAreaTranslation.x; 263 | } 264 | 265 | public string TimeAsString(double timeValue, string format = "F2") 266 | { 267 | string result; 268 | if (this._timeInFrames) 269 | { 270 | result = TimeUtility.TimeAsFrames(timeValue, (double)this._frameRate, format); 271 | } 272 | else 273 | { 274 | result = TimeUtility.TimeAsTimeCode(timeValue, (double)this._frameRate, format); 275 | } 276 | return result; 277 | } 278 | 279 | public float TimeToPixel(double time) 280 | { 281 | return _simpleTimeArea.TimeToPixel((float)time, _timeAreaBounds); 282 | } 283 | 284 | public float TimeToPixel(double time, float rectWidth, float rectX, float x, float y, float width) 285 | { 286 | return _simpleTimeArea.TimeToPixel((float)time, rectWidth, rectX, x, y, width); 287 | } 288 | 289 | public float YToPixel(float y) 290 | { 291 | return _simpleTimeArea.YToPixel(y, _timeAreaBounds); 292 | } 293 | 294 | public float PixelToY(float pixel) 295 | { 296 | return _simpleTimeArea.PixelToY(pixel); 297 | } 298 | 299 | public float PixelToTime(float pixel) 300 | { 301 | return _simpleTimeArea.PixelToTime(pixel, _timeAreaBounds); 302 | } 303 | 304 | public float TimeAreaPixelToTime(float pixel) 305 | { 306 | return this.PixelToTime(pixel); 307 | } 308 | 309 | public double GetSnappedTimeAtMousePosition(Vector2 mousePos) 310 | { 311 | return this.SnapToFrameIfRequired((double)this.ScreenSpacePixelToTimeAreaTime(mousePos.x)); 312 | } 313 | 314 | public double SnapToFrameIfRequired(double time) 315 | { 316 | double result; 317 | if (this._frameSnap) 318 | { 319 | result = TimeUtility.FromFrames(TimeUtility.ToFrames(time, (double)this._frameRate), (double)this._frameRate); 320 | } 321 | else 322 | { 323 | result = time; 324 | } 325 | return result; 326 | } 327 | 328 | public float ScreenSpacePixelToTimeAreaTime(float p) 329 | { 330 | p -= this._timeAreaBounds.x; 331 | return this.TrackSpacePixelToTimeAreaTime(p); 332 | } 333 | 334 | public float TrackSpacePixelToTimeAreaTime(float p) 335 | { 336 | p -= this.timeAreaTranslation.x; 337 | float result; 338 | if (this.timeAreaScale.x > 0f) 339 | { 340 | result = p / this.timeAreaScale.x; 341 | } 342 | else 343 | { 344 | result = p; 345 | } 346 | return result; 347 | } 348 | 349 | // Change params to hrangelocked and vrangelocked 350 | // protected void InitTimeArea() 351 | protected void InitTimeArea( 352 | bool hLocked = false, 353 | bool vLocked = true, 354 | bool showhSlider = false, 355 | bool showVSlider = false) 356 | { 357 | if (_simpleTimeArea == null) 358 | { 359 | // create new timeArea 360 | this._simpleTimeArea = new TimeArea(false) 361 | { 362 | hRangeLocked = hLocked, 363 | vRangeLocked = vLocked, 364 | margin = 10f, 365 | scaleWithWindow = true, 366 | hSlider = showhSlider, 367 | vSlider = showVSlider, 368 | hRangeMin = 0f, 369 | vRangeMin = float.NegativeInfinity, 370 | vRangeMax = float.PositiveInfinity, 371 | mRect = _timeAreaBounds, 372 | }; 373 | this._simpleTimeArea.hTicks.SetTickModulosForFrameRate(this._frameRate); 374 | // show time range begin seconds to end seconds(xxs - xxs) 375 | this._simpleTimeArea.SetShownHRange(-1, 5f); 376 | this._simpleTimeArea.SetShownVRange(0, 100f); 377 | 378 | Debug.Log("------>## Init Simple Time Area ##"); 379 | } 380 | } 381 | 382 | protected void DrawTimeRulerArea() 383 | { 384 | // 385 | // Draw Current Running Time Cursor and red guide line 386 | // 387 | GUILayout.BeginArea(_rectTimeAreaTotal, string.Empty/*, EditorStyles.toolbarButton*/); 388 | Color cl01 = GUI.color; 389 | GUI.color = Color.red; 390 | float timeToPos = TimeToPixel(this.RunningTime); 391 | GUI.DrawTexture(new Rect(-ARROW_WIDTH + timeToPos - _rectTimeAreaRuler.x, 2, ARROW_WIDTH * 2f, ARROW_WIDTH * 2f * 1.82f), ResManager.TimeHeadTexture); 392 | GUI.color = cl01; 393 | Rect lineRect = new Rect(timeToPos - _rectTimeAreaRuler.x, TIMELINETIMELABEL_HEIGHT, 1, _rectTimeAreaContent.height + 6); 394 | EditorGUI.DrawRect(lineRect, Color.red); 395 | GUILayout.EndArea(); 396 | 397 | // 398 | // Draw Cut off Cursor and blue guide line 399 | // 400 | GUILayout.BeginArea(_rectTimeAreaTotal); 401 | timeToPos = TimeToPixel(this.CutOffTime); 402 | GUI.color = new Color(0 / 255f, 196f / 255f, 255f / 255f); 403 | Handles.color = new Color(0 / 255f, 196f / 255f, 255f / 255f); 404 | Handles.DrawLine( 405 | new Vector3(timeToPos - _rectTimeAreaRuler.x, timeRulerHeight), 406 | new Vector3(timeToPos - _rectTimeAreaRuler.x, this.position.height - timeRulerHeight - ARROW_WIDTH * 2 + 16)); 407 | 408 | Rect cutOffRect = new Rect(-ARROW_WIDTH + timeToPos - _rectTimeAreaRuler.x, base.position.height - ARROW_WIDTH * 2 * 1.82f - toolbarHeight, ARROW_WIDTH * 2, ARROW_WIDTH * 2 * 1.82f); 409 | GUI.DrawTexture(cutOffRect, ResManager.CutOffGuideLineTexture); 410 | GUI.color = cl01; 411 | GUILayout.EndArea(); 412 | 413 | // 414 | // Time ruler 415 | // 416 | _simpleTimeArea.TimeRuler(_rectTimeAreaRuler, _frameRate, true, false, 1f, _timeInFrames ? TimeArea.TimeFormat.Frame : TimeArea.TimeFormat.TimeFrame); 417 | 418 | if (_dragCutOffTimeArrow) 419 | { 420 | DrawLineWithTipsRectByTime(this.CutOffTime, 0f, _rectTimeAreaRuler.y, true, new Color(0.6f, 0.6f, 0.6f)); 421 | } 422 | } 423 | 424 | protected void OnTimeRulerCursorAndCutOffCursorInput() 425 | { 426 | // 427 | // Mouse drag for cut off guideline 428 | // 429 | float timeToPos = TimeToPixel(this.CutOffTime); 430 | Rect cutOffRect = new Rect(-ARROW_WIDTH + timeToPos - _rectTimeAreaRuler.x, base.position.height - ARROW_WIDTH * 2 - toolbarHeight, ARROW_WIDTH * 2, ARROW_WIDTH * 2); 431 | Event evt = Event.current; 432 | int controlId = GUIUtility.GetControlID(kBlueCursorControlID, FocusType.Passive); 433 | int redControlId = GUIUtility.GetControlID(kRedCursorControlID, FocusType.Passive); 434 | 435 | if (evt.rawType == EventType.MouseUp) 436 | { 437 | if (GUIUtility.hotControl == controlId || GUIUtility.hotControl == redControlId) 438 | { 439 | GUIUtility.hotControl = 0; 440 | evt.Use(); 441 | } 442 | _dragCutOffTimeArrow = false; 443 | } 444 | Vector2 mousePos = new Vector2(evt.mousePosition.x - _rectTimeAreaTotal.x, evt.mousePosition.y - _rectTimeAreaTotal.y); 445 | if (!Application.isPlaying) 446 | { 447 | switch (evt.GetTypeForControl(controlId)) 448 | { 449 | case EventType.MouseDown: 450 | { 451 | if (cutOffRect.Contains(mousePos)) 452 | { 453 | GUIUtility.hotControl = controlId; 454 | evt.Use(); 455 | } 456 | } 457 | break; 458 | case EventType.MouseDrag: 459 | { 460 | if (GUIUtility.hotControl == controlId) 461 | { 462 | Vector2 vec = new Vector2(evt.mousePosition.x, evt.mousePosition.y); 463 | double fTime = GetSnappedTimeAtMousePosition(vec); 464 | if (fTime <= 0) 465 | fTime = 0; 466 | this.CutOffTime = fTime; 467 | _dragCutOffTimeArrow = true; 468 | } 469 | } 470 | break; 471 | default: break; 472 | } 473 | } 474 | 475 | // 476 | // Drag cut off time guide line 477 | // 478 | // Mouse for time guide line 479 | evt = Event.current; 480 | mousePos = evt.mousePosition; 481 | 482 | if (!Application.isPlaying) 483 | { 484 | switch (evt.GetTypeForControl(redControlId)) 485 | { 486 | case EventType.MouseDown: 487 | { 488 | if (_rectTimeAreaRuler.Contains(mousePos)) 489 | { 490 | GUIUtility.hotControl = redControlId; 491 | evt.Use(); 492 | double fTime = GetSnappedTimeAtMousePosition(mousePos); 493 | if (fTime <= 0) 494 | fTime = 0.0; 495 | this.RunningTime = fTime; 496 | } 497 | } 498 | break; 499 | case EventType.MouseDrag: 500 | { 501 | if (GUIUtility.hotControl == redControlId) 502 | { 503 | if (!IsLockDragHeaderArrow) 504 | { 505 | double fTime = GetSnappedTimeAtMousePosition(mousePos); 506 | if (fTime <= 0) 507 | fTime = 0.0; 508 | this.RunningTime = fTime; 509 | } 510 | } 511 | } 512 | break; 513 | default: break; 514 | } 515 | } 516 | } 517 | 518 | private static int kRedCursorControlID = "RedCursorControlRect".GetHashCode(); 519 | private static int kBlueCursorControlID = "BlueCursorControlRect".GetHashCode(); 520 | 521 | protected void DrawLineWithTipsRectByTime(double fTime, float offSet, float yPos, bool dotLine, Color color) 522 | { 523 | float timeToPos = TimeToPixel(fTime); 524 | Rect drawRect = new Rect(timeToPos - offSet, yPos, 1, _rectTimeAreaContent.height + 15); 525 | float num = drawRect.y; 526 | Vector3 p = new Vector3(drawRect.x, num, 0f); 527 | Vector3 p2 = new Vector3(drawRect.x, num + Mathf.Min(drawRect.height, _rectTimeAreaTotal.height), 0f); 528 | if (true) 529 | { 530 | if (dotLine) 531 | { 532 | TimeAreaTools.DrawDottedLine(p, p2, 5f, color); 533 | } 534 | else 535 | { 536 | // Rect rect2 = Rect.MinMaxRect(p.x - 0.5f, p.y, p2.x + 0.5f, p2.y); 537 | EditorGUI.DrawRect(drawRect, color); 538 | } 539 | } 540 | 541 | // draw time tips 542 | // Time ruler 543 | GUIStyle TimelineTick = "AnimationTimelineTick"; 544 | string beginTime = TimeAsString(fTime); 545 | GUIContent lb = new GUIContent(beginTime); 546 | Vector2 size = TimelineTick.CalcSize(lb); 547 | Color pre = GUI.color; 548 | GUI.color = Color.white; 549 | Rect rectTip = new Rect(timeToPos - offSet, yPos, size.x, size.y); 550 | rectTip.x -= 4; 551 | rectTip.width += 8; 552 | GUI.Box(rectTip, GUIContent.none, "Button"); 553 | rectTip.y = yPos - 3; 554 | rectTip.x += 4; 555 | rectTip.width -= 8; 556 | GUI.color = pre; 557 | GUI.Label(rectTip, lb, TimelineTick); 558 | } 559 | 560 | // 561 | // Key for Frame Movement 562 | // 563 | 564 | public delegate void OnUserInputKeyCode(bool ctrl, KeyCode code); 565 | 566 | private event OnUserInputKeyCode _inputKeyCodeEvt; 567 | protected void RegisterInputKeyCodeEvt(OnUserInputKeyCode evt) 568 | { 569 | if (evt != null) 570 | { 571 | _inputKeyCodeEvt += evt; 572 | } 573 | } 574 | 575 | protected void UnRegisterInputKeyCodeEvt(OnUserInputKeyCode evt) 576 | { 577 | if (evt != null) 578 | { 579 | _inputKeyCodeEvt -= evt; 580 | } 581 | } 582 | 583 | 584 | protected void OnUserInput(Event evt) 585 | { 586 | if (evt.type == EventType.KeyDown) 587 | { 588 | if (!evt.control && evt.keyCode == KeyCode.P) 589 | { 590 | if (_inputKeyCodeEvt != null) 591 | _inputKeyCodeEvt(false, KeyCode.P); 592 | } 593 | } 594 | 595 | if (evt.control) 596 | { 597 | if (evt.type == EventType.KeyDown) 598 | { 599 | if (_inputKeyCodeEvt != null) 600 | { 601 | _inputKeyCodeEvt(true, evt.keyCode); 602 | } 603 | } 604 | } 605 | } 606 | 607 | private void ChangeTimeCode(object obj) 608 | { 609 | string a = obj.ToString(); 610 | if (a == "frames") 611 | { 612 | _timeInFrames = true; 613 | } 614 | else 615 | { 616 | _timeInFrames = false; 617 | } 618 | } 619 | 620 | protected void OnClickSettingButton() 621 | { 622 | GenericMenu genericMenu = new GenericMenu(); 623 | genericMenu.AddItem(new GUIContent("Seconds"), !_timeInFrames, new GenericMenu.MenuFunction2(this.ChangeTimeCode), "seconds"); 624 | genericMenu.AddItem(new GUIContent("Frames"), _timeInFrames, new GenericMenu.MenuFunction2(this.ChangeTimeCode), "frames"); 625 | genericMenu.AddSeparator(""); 626 | genericMenu.AddDisabledItem(new GUIContent("Frame rate")); 627 | genericMenu.AddItem(new GUIContent("Film (24)"), _frameRate.Equals(24f), delegate (object r) 628 | { 629 | this._frameRate = (float)r; 630 | }, 24f); 631 | //genericMenu.AddItem(new GUIContent("PAL (25)"), _frameRate.Equals(25f), delegate (object r) 632 | //{ 633 | // _frameRate = (float)r; 634 | //}, 25f); 635 | //genericMenu.AddItem(new GUIContent("NTSC (29.97)"), _frameRate.Equals(29.97f), delegate (object r) 636 | //{ 637 | // _frameRate = (float)r; 638 | //}, 29.97f); 639 | genericMenu.AddItem(new GUIContent("30"), _frameRate.Equals(30f), delegate (object r) 640 | { 641 | _frameRate = (float)r; 642 | }, 30f); 643 | genericMenu.AddItem(new GUIContent("50"), _frameRate.Equals(50f), delegate (object r) 644 | { 645 | _frameRate = (float)r; 646 | }, 50f); 647 | genericMenu.AddItem(new GUIContent("60"), _frameRate.Equals(60f), delegate (object r) 648 | { 649 | _frameRate = (float)r; 650 | }, 60f); 651 | genericMenu.AddDisabledItem(new GUIContent("Custom")); 652 | genericMenu.AddSeparator(""); 653 | genericMenu.AddItem(new GUIContent("Snap to Frame"), this._frameSnap, delegate 654 | { 655 | this._frameSnap = !this._frameSnap; 656 | }); 657 | genericMenu.AddItem(new GUIContent("Edge Snap"), this._edgeSnaps, delegate 658 | { 659 | this._edgeSnaps = !this._edgeSnaps; 660 | }); 661 | 662 | OnCreateSettingContent(genericMenu); 663 | genericMenu.ShowAsContext(); 664 | } 665 | 666 | protected virtual void OnCreateSettingContent(GenericMenu menu) 667 | { 668 | 669 | } 670 | } 671 | } 672 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/SimpleTimeArea.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 513329993781c4d40bbdad1e444dc893 3 | timeCreated: 1496761231 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TickHandler.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | namespace DMTimeArea 6 | { 7 | public class TickHandler 8 | { 9 | private int m_BiggestTick = -1; 10 | private float m_MaxValue = 1f; 11 | private float m_MinValue; 12 | private float m_PixelRange = 1f; 13 | private int m_SmallestTick; 14 | private float[] m_TickModulos = new float[0]; 15 | private float[] m_TickStrengths = new float[0]; 16 | internal int tickLevels 17 | { 18 | get 19 | { 20 | return this.m_BiggestTick - this.m_SmallestTick + 1; 21 | } 22 | } 23 | internal int GetLevelWithMinSeparation(float pixelSeparation) 24 | { 25 | for (int i = 0; i < this.m_TickModulos.Length; i++) 26 | { 27 | if (this.m_TickModulos[i] * this.m_PixelRange / (this.m_MaxValue - this.m_MinValue) >= pixelSeparation) 28 | { 29 | return i - this.m_SmallestTick; 30 | } 31 | } 32 | return -1; 33 | } 34 | internal float GetPeriodOfLevel(int level) 35 | { 36 | return this.m_TickModulos[Mathf.Clamp(this.m_SmallestTick + level, 0, this.m_TickModulos.Length - 1)]; 37 | } 38 | internal float GetStrengthOfLevel(int level) 39 | { 40 | return this.m_TickStrengths[this.m_SmallestTick + level]; 41 | } 42 | internal float[] GetTicksAtLevel(int level, bool excludeTicksFromHigherlevels) 43 | { 44 | int num = Mathf.Clamp(this.m_SmallestTick + level, 0, this.m_TickModulos.Length - 1); 45 | List list = new List(); 46 | int arg_48_0 = Mathf.FloorToInt(this.m_MinValue / this.m_TickModulos[num]); 47 | int num2 = Mathf.CeilToInt(this.m_MaxValue / this.m_TickModulos[num]); 48 | for (int i = arg_48_0; i <= num2; i++) 49 | { 50 | if (!excludeTicksFromHigherlevels || num >= this.m_BiggestTick || i % Mathf.RoundToInt(this.m_TickModulos[num + 1] / this.m_TickModulos[num]) != 0) 51 | { 52 | list.Add((float)i * this.m_TickModulos[num]); 53 | } 54 | } 55 | return list.ToArray(); 56 | } 57 | internal void SetRanges(float minValue, float maxValue, float minPixel, float maxPixel) 58 | { 59 | this.m_MinValue = minValue; 60 | this.m_MaxValue = maxValue; 61 | this.m_PixelRange = maxPixel - minPixel; 62 | } 63 | internal void SetTickModulos(float[] tickModulos) 64 | { 65 | this.m_TickModulos = tickModulos; 66 | } 67 | public void SetTickModulosForFrameRate(float frameRate) 68 | { 69 | if (frameRate != Mathf.Round(frameRate)) 70 | { 71 | float[] tickModulos = new float[] 72 | { 73 | 1f / frameRate, 74 | 5f / frameRate, 75 | 10f / frameRate, 76 | 50f / frameRate, 77 | 100f / frameRate, 78 | 500f / frameRate, 79 | 1000f / frameRate, 80 | 5000f / frameRate, 81 | 10000f / frameRate, 82 | 50000f / frameRate, 83 | 100000f / frameRate, 84 | 500000f / frameRate 85 | }; 86 | this.SetTickModulos(tickModulos); 87 | return; 88 | } 89 | List list = new List(); 90 | int num = 1; 91 | while ((float)num < frameRate && (float)num != frameRate) 92 | { 93 | int num2 = Mathf.RoundToInt(frameRate / (float)num); 94 | if (num2 % 60 == 0) 95 | { 96 | num *= 2; 97 | list.Add(num); 98 | } 99 | else 100 | { 101 | if (num2 % 30 == 0) 102 | { 103 | num *= 3; 104 | list.Add(num); 105 | } 106 | else 107 | { 108 | if (num2 % 20 == 0) 109 | { 110 | num *= 2; 111 | list.Add(num); 112 | } 113 | else 114 | { 115 | if (num2 % 10 == 0) 116 | { 117 | num *= 2; 118 | list.Add(num); 119 | } 120 | else 121 | { 122 | if (num2 % 5 == 0) 123 | { 124 | num *= 5; 125 | list.Add(num); 126 | } 127 | else 128 | { 129 | if (num2 % 2 == 0) 130 | { 131 | num *= 2; 132 | list.Add(num); 133 | } 134 | else 135 | { 136 | if (num2 % 3 == 0) 137 | { 138 | num *= 3; 139 | list.Add(num); 140 | } 141 | else 142 | { 143 | num = Mathf.RoundToInt(frameRate); 144 | } 145 | } 146 | } 147 | } 148 | } 149 | } 150 | } 151 | } 152 | float[] array = new float[9 + list.Count]; 153 | for (int i = 0; i < list.Count; i++) 154 | { 155 | array[i] = 1f / (float)list[list.Count - i - 1]; 156 | } 157 | array[array.Length - 1] = 3600f; 158 | array[array.Length - 2] = 1800f; 159 | array[array.Length - 3] = 600f; 160 | array[array.Length - 4] = 300f; 161 | array[array.Length - 5] = 60f; 162 | array[array.Length - 6] = 30f; 163 | array[array.Length - 7] = 10f; 164 | array[array.Length - 8] = 5f; 165 | array[array.Length - 9] = 1f; 166 | this.SetTickModulos(array); 167 | } 168 | internal void SetTickStrengths(float tickMinSpacing, float tickMaxSpacing, bool sqrt) 169 | { 170 | this.m_TickStrengths = new float[this.m_TickModulos.Length]; 171 | this.m_SmallestTick = 0; 172 | this.m_BiggestTick = this.m_TickModulos.Length - 1; 173 | for (int i = this.m_TickModulos.Length - 1; i >= 0; i--) 174 | { 175 | float num = this.m_TickModulos[i] * this.m_PixelRange / (this.m_MaxValue - this.m_MinValue); 176 | this.m_TickStrengths[i] = (num - tickMinSpacing) / (tickMaxSpacing - tickMinSpacing); 177 | if (this.m_TickStrengths[i] >= 1f) 178 | { 179 | this.m_BiggestTick = i; 180 | } 181 | if (num <= tickMinSpacing) 182 | { 183 | this.m_SmallestTick = i; 184 | break; 185 | } 186 | } 187 | for (int j = this.m_SmallestTick; j <= this.m_BiggestTick; j++) 188 | { 189 | this.m_TickStrengths[j] = Mathf.Clamp01(this.m_TickStrengths[j]); 190 | if (sqrt) 191 | { 192 | this.m_TickStrengths[j] = Mathf.Sqrt(this.m_TickStrengths[j]); 193 | } 194 | } 195 | } 196 | } 197 | } 198 | 199 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TickHandler.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0e90d859fba149545b4364cedad30144 3 | timeCreated: 1495765291 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TimeArea.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using System; 6 | using System.Reflection; 7 | using TickHandler = DMTimeArea.TickHandler; 8 | 9 | namespace DMTimeArea 10 | { 11 | public class TimeArea : ZoomableArea 12 | { 13 | public enum TimeFormat 14 | { 15 | None, 16 | TimeFrame, 17 | Frame 18 | } 19 | private class Styles2 20 | { 21 | public GUIStyle TimelineTick = "AnimationTimelineTick"; 22 | public GUIStyle labelTickMarks = "CurveEditorLabelTickMarks"; 23 | } 24 | public enum TimeRulerDragMode 25 | { 26 | None, 27 | Start, 28 | End, 29 | Dragging, 30 | Cancel 31 | } 32 | 33 | [SerializeField] 34 | private TickHandler m_HTicks; 35 | [SerializeField] 36 | private TickHandler m_VTicks; 37 | private bool m_showVTicks = false; 38 | internal const int kTickRulerDistMin = 3; 39 | internal const int kTickRulerDistFull = 80; 40 | internal const int kTickRulerDistLabel = 40; 41 | internal const float kTickRulerHeightMax = 0.7f; 42 | internal const float kTickRulerFatThreshold = 0.5f; 43 | private static TimeArea.Styles2 styles; 44 | private static float s_OriginalTime; 45 | private static float s_PickOffset; 46 | public TickHandler hTicks 47 | { 48 | get 49 | { 50 | return this.m_HTicks; 51 | } 52 | set 53 | { 54 | this.m_HTicks = value; 55 | } 56 | } 57 | public TickHandler vTicks 58 | { 59 | get 60 | { 61 | return this.m_VTicks; 62 | } 63 | set 64 | { 65 | this.m_VTicks = value; 66 | } 67 | } 68 | public TimeArea(bool minimalGUI) : base(minimalGUI) 69 | { 70 | float[] tickModulos = new float[] 71 | { 72 | 1E-07f, 73 | 5E-07f, 74 | 1E-06f, 75 | 5E-06f, 76 | 1E-05f, 77 | 5E-05f, 78 | 0.0001f, 79 | 0.0005f, 80 | 0.001f, 81 | 0.005f, 82 | 0.01f, 83 | 0.05f, 84 | 0.1f, 85 | 0.5f, 86 | 1f, 87 | 5f, 88 | 10f, 89 | 50f, 90 | 100f, 91 | 500f, 92 | 1000f, 93 | 5000f, 94 | 10000f, 95 | 50000f, 96 | 100000f, 97 | 500000f, 98 | 1000000f, 99 | 5000000f, 100 | 1E+07f 101 | }; 102 | this.hTicks = new TickHandler(); 103 | this.hTicks.SetTickModulos(tickModulos); 104 | this.vTicks = new TickHandler(); 105 | this.vTicks.SetTickModulos(tickModulos); 106 | } 107 | private static void InitStyles() 108 | { 109 | if (TimeArea.styles == null) 110 | { 111 | TimeArea.styles = new TimeArea.Styles2(); 112 | } 113 | } 114 | 115 | public void SetTickMarkerRanges() 116 | { 117 | this.hTicks.SetRanges(base.shownArea.xMin, base.shownArea.xMax, base.drawRect.xMin, base.drawRect.xMax); 118 | this.vTicks.SetRanges(base.shownArea.yMin, base.shownArea.yMax, base.drawRect.yMin, base.drawRect.yMax); 119 | } 120 | 121 | public void DrawMajorTicks(Rect position, float frameRate) 122 | { 123 | Color color = Handles.color; 124 | GUI.BeginGroup(position); 125 | if (Event.current.type != EventType.Repaint) 126 | { 127 | GUI.EndGroup(); 128 | } 129 | else 130 | { 131 | TimeArea.InitStyles(); 132 | this.SetTickMarkerRanges(); 133 | this.hTicks.SetTickStrengths(3f, 80f, true); 134 | Color textColor = TimeArea.styles.TimelineTick.normal.textColor; 135 | textColor.a = 0.1f; 136 | Handles.color = textColor; 137 | Rect shownArea = base.shownArea; 138 | for (int i = 0; i < this.hTicks.tickLevels; i++) 139 | { 140 | float num = this.hTicks.GetStrengthOfLevel(i) * 0.9f; 141 | if (num > 0.5f) 142 | { 143 | float[] ticksAtLevel = this.hTicks.GetTicksAtLevel(i, true); 144 | for (int j = 0; j < ticksAtLevel.Length; j++) 145 | { 146 | if (ticksAtLevel[j] >= 0f) 147 | { 148 | int num2 = Mathf.RoundToInt(ticksAtLevel[j] * frameRate); 149 | float x = this.FrameToPixel((float)num2, frameRate, position, shownArea); 150 | Handles.DrawLine(new Vector3(x, 0f, 0f), new Vector3(x, position.height, 0f)); 151 | } 152 | } 153 | } 154 | } 155 | GUI.EndGroup(); 156 | Handles.color = color; 157 | } 158 | } 159 | 160 | public void TimeRuler(Rect position, float frameRate) 161 | { 162 | this.TimeRuler(position, frameRate, true, false, 1f, TimeArea.TimeFormat.TimeFrame); 163 | } 164 | 165 | public void TimeRuler(Rect position, float frameRate, bool labels, bool useEntireHeight, float alpha) 166 | { 167 | this.TimeRuler(position, frameRate, labels, useEntireHeight, alpha, TimeArea.TimeFormat.TimeFrame); 168 | } 169 | 170 | public void TimeRuler(Rect position, float frameRate, bool labels, bool useEntireHeight, float alpha, TimeArea.TimeFormat timeFormat) 171 | { 172 | Color color = GUI.color; 173 | GUI.BeginGroup(position); 174 | TimeArea.InitStyles(); 175 | // HandleUtility.ApplyWireMaterial(); 176 | TimeAreaTools.ReflectionApplyWireMaterial(); 177 | Color backgroundColor = GUI.backgroundColor; 178 | this.SetTickMarkerRanges(); 179 | this.hTicks.SetTickStrengths(3f, 80f, true); 180 | Color textColor = TimeArea.styles.TimelineTick.normal.textColor; 181 | textColor.a = 0.75f * alpha; 182 | if (Event.current.type == EventType.Repaint) 183 | { 184 | if (Application.platform == RuntimePlatform.WindowsEditor) 185 | { 186 | GL.Begin(7); 187 | } 188 | else 189 | { 190 | GL.Begin(1); 191 | } 192 | // Rect shownArea = base.shownArea; 193 | float a = ShowAreaXMin * frameRate * position.width; 194 | float b = ShowAreaWidth * frameRate; 195 | float width = position.width; 196 | 197 | float horRangeMax = base.hRangeMax; 198 | float horRangeMin = base.hRangeMin; 199 | 200 | for (int i = 0; i < this.hTicks.tickLevels; i++) 201 | { 202 | float num = this.hTicks.GetStrengthOfLevel(i) * 0.9f; 203 | Color c1 = new Color(1f, 1f, 1f, num / 0.5f) * textColor; 204 | float[] ticksAtLevel = this.hTicks.GetTicksAtLevel(i, true); 205 | for (int j = 0; j < ticksAtLevel.Length; j++) 206 | { 207 | if (ticksAtLevel[j] >= horRangeMin && ticksAtLevel[j] <= horRangeMax) 208 | { 209 | int num2 = Mathf.RoundToInt(ticksAtLevel[j] * frameRate); 210 | float num3 = (!useEntireHeight) ? (position.height * Mathf.Min(1f, num) * 0.7f) : position.height; 211 | // float x = this.FrameToPixel((float)num2, frameRate, position, shownArea); 212 | float x = this.FrameToPixelForTimeRuler((float)num2, width, a, b); 213 | TimeArea.DrawVerticalLineFast(x, position.height - num3 + 0.5f, position.height - 0.5f, c1); 214 | } 215 | } 216 | } 217 | GL.End(); 218 | } 219 | if (labels) 220 | { 221 | int levelWithMinSeparation = this.hTicks.GetLevelWithMinSeparation(40f); 222 | float[] ticksAtLevel2 = this.hTicks.GetTicksAtLevel(levelWithMinSeparation, false); 223 | for (int k = 0; k < ticksAtLevel2.Length; k++) 224 | { 225 | if (ticksAtLevel2[k] >= base.hRangeMin && ticksAtLevel2[k] <= base.hRangeMax) 226 | { 227 | int num4 = Mathf.RoundToInt(ticksAtLevel2[k] * frameRate); 228 | float num5 = Mathf.Floor(this.FrameToPixel((float)num4, frameRate, position)); 229 | string text = this.FormatTime(ticksAtLevel2[k], frameRate, timeFormat); 230 | GUI.Label(new Rect(num5 + 3f, -3f, 40f, 20f), text, TimeArea.styles.TimelineTick); 231 | } 232 | } 233 | } 234 | GUI.EndGroup(); 235 | GUI.backgroundColor = backgroundColor; 236 | GUI.color = color; 237 | } 238 | public static void DrawVerticalLine(float x, float minY, float maxY, Color color) 239 | { 240 | if (Event.current.type == EventType.Repaint) 241 | { 242 | // HandleUtility.ApplyWireMaterial(); 243 | TimeAreaTools.ReflectionApplyWireMaterial(); 244 | if (Application.platform == RuntimePlatform.WindowsEditor) 245 | { 246 | GL.Begin(7); 247 | } 248 | else 249 | { 250 | GL.Begin(1); 251 | } 252 | TimeArea.DrawVerticalLineFast(x, minY, maxY, color); 253 | GL.End(); 254 | } 255 | } 256 | public static void DrawVerticalLineFast(float x, float minY, float maxY, Color color) 257 | { 258 | if (Application.platform == RuntimePlatform.WindowsEditor) 259 | { 260 | GL.Color(color); 261 | GL.Vertex(new Vector3(x - 0.5f, minY, 0f)); 262 | GL.Vertex(new Vector3(x + 0.5f, minY, 0f)); 263 | GL.Vertex(new Vector3(x + 0.5f, maxY, 0f)); 264 | GL.Vertex(new Vector3(x - 0.5f, maxY, 0f)); 265 | } 266 | else 267 | { 268 | GL.Color(color); 269 | GL.Vertex(new Vector3(x, minY, 0f)); 270 | GL.Vertex(new Vector3(x, maxY, 0f)); 271 | } 272 | } 273 | public TimeArea.TimeRulerDragMode BrowseRuler(Rect position, ref float time, float frameRate, bool pickAnywhere, GUIStyle thumbStyle) 274 | { 275 | int controlID = GUIUtility.GetControlID(3126789, FocusType.Passive); 276 | return this.BrowseRuler(position, controlID, ref time, frameRate, pickAnywhere, thumbStyle); 277 | } 278 | public TimeArea.TimeRulerDragMode BrowseRuler(Rect position, int id, ref float time, float frameRate, bool pickAnywhere, GUIStyle thumbStyle) 279 | { 280 | Event current = Event.current; 281 | Rect position2 = position; 282 | if (time != -1f) 283 | { 284 | position2.x = Mathf.Round(base.TimeToPixel(time, position)) - (float)thumbStyle.overflow.left; 285 | position2.width = thumbStyle.fixedWidth + (float)thumbStyle.overflow.horizontal; 286 | } 287 | TimeArea.TimeRulerDragMode result; 288 | switch (current.GetTypeForControl(id)) 289 | { 290 | case EventType.MouseDown: 291 | if (position2.Contains(current.mousePosition)) 292 | { 293 | GUIUtility.hotControl = id; 294 | TimeArea.s_PickOffset = current.mousePosition.x - base.TimeToPixel(time, position); 295 | current.Use(); 296 | result = TimeArea.TimeRulerDragMode.Start; 297 | return result; 298 | } 299 | if (pickAnywhere && position.Contains(current.mousePosition)) 300 | { 301 | GUIUtility.hotControl = id; 302 | float num = this.SnapTimeToWholeFPS(base.PixelToTime(current.mousePosition.x, position), frameRate); 303 | TimeArea.s_OriginalTime = time; 304 | if (num != time) 305 | { 306 | GUI.changed = true; 307 | } 308 | time = num; 309 | TimeArea.s_PickOffset = 0f; 310 | current.Use(); 311 | result = TimeArea.TimeRulerDragMode.Start; 312 | return result; 313 | } 314 | break; 315 | case EventType.MouseUp: 316 | if (GUIUtility.hotControl == id) 317 | { 318 | GUIUtility.hotControl = 0; 319 | current.Use(); 320 | result = TimeArea.TimeRulerDragMode.End; 321 | return result; 322 | } 323 | break; 324 | case EventType.MouseDrag: 325 | if (GUIUtility.hotControl == id) 326 | { 327 | float num2 = this.SnapTimeToWholeFPS(base.PixelToTime(current.mousePosition.x - TimeArea.s_PickOffset, position), frameRate); 328 | if (num2 != time) 329 | { 330 | GUI.changed = true; 331 | } 332 | time = num2; 333 | current.Use(); 334 | result = TimeArea.TimeRulerDragMode.Dragging; 335 | return result; 336 | } 337 | break; 338 | case EventType.KeyDown: 339 | if (GUIUtility.hotControl == id && current.keyCode == KeyCode.Escape) 340 | { 341 | if (time != TimeArea.s_OriginalTime) 342 | { 343 | GUI.changed = true; 344 | } 345 | time = TimeArea.s_OriginalTime; 346 | GUIUtility.hotControl = 0; 347 | current.Use(); 348 | result = TimeArea.TimeRulerDragMode.Cancel; 349 | return result; 350 | } 351 | break; 352 | case EventType.Repaint: 353 | if (time != -1f) 354 | { 355 | bool flag = position.Contains(current.mousePosition); 356 | position2.x += (float)thumbStyle.overflow.left; 357 | thumbStyle.Draw(position2, id == GUIUtility.hotControl, flag || id == GUIUtility.hotControl, false, false); 358 | } 359 | break; 360 | } 361 | result = TimeArea.TimeRulerDragMode.None; 362 | return result; 363 | } 364 | private void DrawLine(Vector2 lhs, Vector2 rhs) 365 | { 366 | GL.Vertex(base.DrawingToViewTransformPoint(new Vector3(lhs.x, lhs.y, 0f))); 367 | GL.Vertex(base.DrawingToViewTransformPoint(new Vector3(rhs.x, rhs.y, 0f))); 368 | } 369 | private float FrameToPixel(float i, float frameRate, Rect rect, Rect theShownArea) 370 | { 371 | return (i - theShownArea.xMin * frameRate) * rect.width / (theShownArea.width * frameRate); 372 | } 373 | public float FrameToPixel(float i, float frameRate, Rect rect) 374 | { 375 | return this.FrameToPixel(i, frameRate, rect, base.shownArea); 376 | } 377 | 378 | public float FrameToPixelForTimeRuler(float i, float width, float a, float b) 379 | { 380 | return (i * width - a) / b; 381 | } 382 | //public float TimeField(Rect rect, int id, float time, float frameRate, TimeArea.TimeFormat timeFormat) 383 | //{ 384 | // float result; 385 | // if (timeFormat == TimeArea.TimeFormat.None) 386 | // { 387 | // float time2 = EditorGUI.DoFloatField(EditorGUI.s_RecycledEditor, rect, new Rect(0f, 0f, 0f, 0f), id, time, EditorGUI.kFloatFieldFormatString, EditorStyles.numberField, false); 388 | // result = this.SnapTimeToWholeFPS(time2, frameRate); 389 | // } 390 | // else 391 | // { 392 | // if (timeFormat == TimeArea.TimeFormat.Frame) 393 | // { 394 | // int value = Mathf.RoundToInt(time * frameRate); 395 | // int num = EditorGUI.DoIntField(EditorGUI.s_RecycledEditor, rect, new Rect(0f, 0f, 0f, 0f), id, value, EditorGUI.kIntFieldFormatString, EditorStyles.numberField, false, 0f); 396 | // result = (float)num / frameRate; 397 | // } 398 | // else 399 | // { 400 | // string text = this.FormatTime(time, frameRate, TimeArea.TimeFormat.TimeFrame); 401 | // string allowedletters = "0123456789.,:"; 402 | // bool flag; 403 | // text = EditorGUI.DoTextField(EditorGUI.s_RecycledEditor, id, rect, text, EditorStyles.numberField, allowedletters, out flag, false, false, false); 404 | // if (flag) 405 | // { 406 | // if (GUIUtility.keyboardControl == id) 407 | // { 408 | // GUI.changed = true; 409 | // text = text.Replace(',', '.'); 410 | // int num2 = text.IndexOf(':'); 411 | // if (num2 >= 0) 412 | // { 413 | // string s = text.Substring(0, num2); 414 | // string s2 = text.Substring(num2 + 1); 415 | // int num3; 416 | // int num4; 417 | // if (int.TryParse(s, out num3) && int.TryParse(s2, out num4)) 418 | // { 419 | // float num5 = (float)num3 + (float)num4 / frameRate; 420 | // result = num5; 421 | // return result; 422 | // } 423 | // } 424 | // else 425 | // { 426 | // float time3; 427 | // if (float.TryParse(text, out time3)) 428 | // { 429 | // result = this.SnapTimeToWholeFPS(time3, frameRate); 430 | // return result; 431 | // } 432 | // } 433 | // } 434 | // } 435 | // result = time; 436 | // } 437 | // } 438 | // return result; 439 | //} 440 | //public float ValueField(Rect rect, int id, float value) 441 | //{ 442 | // return EditorGUI.DoFloatField(EditorGUI.s_RecycledEditor, rect, new Rect(0f, 0f, 0f, 0f), id, value, EditorGUI.kFloatFieldFormatString, EditorStyles.numberField, false); 443 | //} 444 | public string FormatTime(float time, float frameRate, TimeArea.TimeFormat timeFormat) 445 | { 446 | string result; 447 | if (timeFormat == TimeArea.TimeFormat.None) 448 | { 449 | int numberOfDecimalsForMinimumDifference; 450 | if (frameRate != 0f) 451 | { 452 | numberOfDecimalsForMinimumDifference = this.ReflectionGetNumberOfDecimalsForMinimumDifference(1f / frameRate); 453 | } 454 | else 455 | { 456 | numberOfDecimalsForMinimumDifference = this.ReflectionGetNumberOfDecimalsForMinimumDifference(base.shownArea.width / base.drawRect.width); 457 | } 458 | result = time.ToString("N" + numberOfDecimalsForMinimumDifference); 459 | } 460 | else 461 | { 462 | int num = Mathf.RoundToInt(time * frameRate); 463 | if (timeFormat == TimeArea.TimeFormat.TimeFrame) 464 | { 465 | int length = ((int)frameRate).ToString().Length; 466 | string str = string.Empty; 467 | if (num < 0) 468 | { 469 | str = "-"; 470 | num = -num; 471 | } 472 | result = str + (num / (int)frameRate).ToString() + ":" + ((float)num % frameRate).ToString().PadLeft(length, '0'); 473 | } 474 | else 475 | { 476 | result = num.ToString(); 477 | } 478 | } 479 | return result; 480 | } 481 | //public string FormatValue(float value) 482 | //{ 483 | // int numberOfDecimalsForMinimumDifference = MathUtils.GetNumberOfDecimalsForMinimumDifference(base.shownArea.height / base.drawRect.height); 484 | // return value.ToString("N" + numberOfDecimalsForMinimumDifference); 485 | //} 486 | public float SnapTimeToWholeFPS(float time, float frameRate) 487 | { 488 | float result; 489 | if (frameRate == 0f) 490 | { 491 | result = time; 492 | } 493 | else 494 | { 495 | result = Mathf.Round(time * frameRate) / frameRate; 496 | } 497 | return result; 498 | } 499 | 500 | public int ReflectionGetNumberOfDecimalsForMinimumDifference(float miniDifference) 501 | { 502 | Type type = typeof(MathUtils); 503 | MethodInfo mth = type.GetMethod("GetNumberOfDecimalsForMinimumDifference", new Type[] { typeof(float) }); 504 | object ret = mth.Invoke(null, new object[] { miniDifference }); 505 | return (int)ret; 506 | } 507 | 508 | public int ReflectionGetNumberOfDecimalsForMinimumDifference(double miniDifference) 509 | { 510 | Type type = typeof(MathUtils); 511 | MethodInfo mth = type.GetMethod("GetNumberOfDecimalsForMinimumDifference", new Type[] { typeof(double) }); 512 | object ret = mth.Invoke(null, new object[] { miniDifference }); 513 | return (int)ret; 514 | } 515 | 516 | 517 | //ADD BY LITAO 518 | //获取当前画布的最小最大时间 519 | public float[] GetMinMaxAreaTime(float frameRate) 520 | { 521 | int levelWithMinSeparation = this.hTicks.GetLevelWithMinSeparation(40f); 522 | float[] ticksAtLevel2 = this.hTicks.GetTicksAtLevel(levelWithMinSeparation, false); 523 | return new float[2] { ticksAtLevel2[0], ticksAtLevel2[ticksAtLevel2.Length - 1] }; 524 | } 525 | } 526 | } 527 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TimeArea.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bd7421114ddf034d81c47d5b86d0e42 3 | timeCreated: 1495765291 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TimeAreaTools.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using System; 5 | using System.Reflection; 6 | using UnityEditor; 7 | 8 | public static class TimeAreaTools 9 | { 10 | private static MethodInfo applyWireMaterialMethodInfor = null; 11 | public static void ReflectionApplyWireMaterial() 12 | { 13 | if (applyWireMaterialMethodInfor == null) 14 | { 15 | Type type = typeof(HandleUtility); 16 | applyWireMaterialMethodInfor = type.GetMethod( 17 | "ApplyWireMaterial", 18 | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static | BindingFlags.FlattenHierarchy, 19 | null, 20 | new Type[] { }, 21 | null 22 | ); 23 | } 24 | applyWireMaterialMethodInfor.Invoke(null, null); 25 | } 26 | 27 | public static void DrawDottedLine(Vector3 p1, Vector3 p2, float segmentsLength, Color col) 28 | { 29 | ReflectionApplyWireMaterial(); 30 | GL.Begin(1); 31 | GL.Color(col); 32 | float num = Vector3.Distance(p1, p2); 33 | int num2 = Mathf.CeilToInt(num / segmentsLength); 34 | for (int i = 0; i < num2; i += 2) 35 | { 36 | GL.Vertex(Vector3.Lerp(p1, p2, (float)i * segmentsLength / num)); 37 | GL.Vertex(Vector3.Lerp(p1, p2, (float)(i + 1) * segmentsLength / num)); 38 | } 39 | GL.End(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TimeAreaTools.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c0a479e91c7382142bd9f60610a4632a 3 | timeCreated: 1496223130 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TimeUtility.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Text.RegularExpressions; 4 | 5 | namespace DMTimeArea 6 | { 7 | internal static class TimeUtility 8 | { 9 | public static readonly double kTimeEpsilon = 1E-14; 10 | private static void ValidateFrameRate(double frameRate) 11 | { 12 | if (frameRate <= TimeUtility.kTimeEpsilon) 13 | { 14 | throw new ArgumentException("frame rate cannot be 0 or negative"); 15 | } 16 | } 17 | public static int ToFrames(double time, double frameRate) 18 | { 19 | TimeUtility.ValidateFrameRate(frameRate); 20 | double num = TimeUtility.kTimeEpsilon * time; 21 | int result; 22 | if (time < 0.0) 23 | { 24 | result = (int)Math.Ceiling(time * frameRate + num); 25 | } 26 | else 27 | { 28 | result = (int)Math.Floor(time * frameRate + num); 29 | } 30 | return result; 31 | } 32 | public static double ToExactFrames(double time, double frameRate) 33 | { 34 | TimeUtility.ValidateFrameRate(frameRate); 35 | return time * frameRate; 36 | } 37 | public static double FromFrames(int frames, double frameRate) 38 | { 39 | TimeUtility.ValidateFrameRate(frameRate); 40 | return (double)frames / frameRate; 41 | } 42 | 43 | public static double RoundToFrame(double time, double frameRate) 44 | { 45 | TimeUtility.ValidateFrameRate(frameRate); 46 | double num = Math.Max((double)((int)Math.Floor(time * frameRate)) / frameRate, 0.0); 47 | double num2 = Math.Max((double)((int)Math.Ceiling(time * frameRate)) / frameRate, 0.0); 48 | return (Math.Abs(time - num) >= Math.Abs(time - num2)) ? num2 : num; 49 | } 50 | 51 | public static double FromFrames(double frames, double frameRate) 52 | { 53 | TimeUtility.ValidateFrameRate(frameRate); 54 | return frames / frameRate; 55 | } 56 | 57 | public static bool OnFrameBoundary(double time, double frameRate) 58 | { 59 | return TimeUtility.OnFrameBoundary(time, frameRate, Math.Max(time, 1.0) * frameRate * TimeUtility.kTimeEpsilon); 60 | } 61 | 62 | public static bool OnFrameBoundary(double time, double frameRate, double epsilon) 63 | { 64 | TimeUtility.ValidateFrameRate(frameRate); 65 | double num = TimeUtility.ToExactFrames(time, frameRate); 66 | double num2 = Math.Round(num); 67 | return Math.Abs(num - num2) < epsilon; 68 | } 69 | 70 | public static string TimeAsFrames(double timeValue, double frameRate, string format = "F2") 71 | { 72 | string result; 73 | if (TimeUtility.OnFrameBoundary(timeValue, frameRate)) 74 | { 75 | result = TimeUtility.ToFrames(timeValue, frameRate).ToString(); 76 | } 77 | else 78 | { 79 | result = TimeUtility.ToExactFrames(timeValue, frameRate).ToString(format); 80 | } 81 | return result; 82 | } 83 | 84 | public static string TimeAsTimeCode(double timeValue, double frameRate, string format = "F2") 85 | { 86 | TimeUtility.ValidateFrameRate(frameRate); 87 | int num = (int)Math.Abs(timeValue); 88 | int num2 = num / 3600; 89 | int num3 = num % 3600 / 60; 90 | int num4 = num % 60; 91 | string str = (timeValue >= 0.0) ? string.Empty : "-"; 92 | string str2; 93 | if (num2 > 0) 94 | { 95 | str2 = string.Concat(new string[] 96 | { 97 | num2.ToString(), 98 | ":", 99 | num3.ToString("D2"), 100 | ":", 101 | num4.ToString("D2") 102 | }); 103 | } 104 | else 105 | { 106 | if (num3 > 0) 107 | { 108 | str2 = num3.ToString() + ":" + num4.ToString("D2"); 109 | } 110 | else 111 | { 112 | str2 = num4.ToString(); 113 | } 114 | } 115 | int totalWidth = (int)Math.Floor(Math.Log10(frameRate) + 1.0); 116 | string text = (TimeUtility.ToFrames(timeValue, frameRate) - TimeUtility.ToFrames((double)num, frameRate)).ToString().PadLeft(totalWidth, '0'); 117 | if (!TimeUtility.OnFrameBoundary(timeValue, frameRate)) 118 | { 119 | string text2 = TimeUtility.ToExactFrames(timeValue, frameRate).ToString(format); 120 | int num5 = text2.IndexOf('.'); 121 | if (num5 >= 0) 122 | { 123 | text = text + " [" + text2.Substring(num5) + "]"; 124 | } 125 | } 126 | return str + str2 + ":" + text; 127 | } 128 | 129 | public static double ParseTimeCode(string timeCode, double frameRate, double defaultValue) 130 | { 131 | timeCode = new string(( 132 | from c in timeCode 133 | where !char.IsWhiteSpace(c) 134 | select c).ToArray()); 135 | string[] array = timeCode.Split(new char[] 136 | { 137 | ':' 138 | }); 139 | double result; 140 | if (array.Length == 0 || array.Length > 4) 141 | { 142 | result = defaultValue; 143 | } 144 | else 145 | { 146 | int num = 0; 147 | int num2 = 0; 148 | double num3 = 0.0; 149 | double num4 = 0.0; 150 | try 151 | { 152 | if (Regex.Match(array.Last(), "^\\d+\\.\\d+$").Success) 153 | { 154 | num3 = double.Parse(array.Last()); 155 | if (array.Length > 3) 156 | { 157 | result = defaultValue; 158 | return result; 159 | } 160 | if (array.Length > 1) 161 | { 162 | num2 = int.Parse(array[array.Length - 2]); 163 | } 164 | if (array.Length > 2) 165 | { 166 | num = int.Parse(array[array.Length - 3]); 167 | } 168 | } 169 | else 170 | { 171 | if (Regex.Match(array.Last(), "^\\d+\\[\\.\\d+\\]$").Success) 172 | { 173 | string s = new string(( 174 | from c in array.Last() 175 | where c != '[' && c != ']' 176 | select c).ToArray()); 177 | num4 = double.Parse(s); 178 | } 179 | else 180 | { 181 | if (!Regex.Match(array.Last(), "^\\d*$").Success) 182 | { 183 | result = defaultValue; 184 | return result; 185 | } 186 | num4 = (double)int.Parse(array.Last()); 187 | } 188 | if (array.Length > 1) 189 | { 190 | num3 = (double)int.Parse(array[array.Length - 2]); 191 | } 192 | if (array.Length > 2) 193 | { 194 | num2 = int.Parse(array[array.Length - 3]); 195 | } 196 | if (array.Length > 3) 197 | { 198 | num = int.Parse(array[array.Length - 4]); 199 | } 200 | } 201 | } 202 | catch (FormatException) 203 | { 204 | result = defaultValue; 205 | return result; 206 | } 207 | result = num4 / frameRate + num3 + (double)(num2 * 60) + (double)(num * 3600); 208 | } 209 | return result; 210 | } 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/TimeUtility.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d3af22d077bac449bdb5decbcb89301 3 | timeCreated: 1495765291 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/Editor/ZoomableArea.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faf207cccc7da5c4c82355c8c7d97507 3 | timeCreated: 1495765291 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f8f508a6937ca714482d215743dd7c39 3 | folderAsset: yes 4 | timeCreated: 1502780208 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/CutOffLinePlayhead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/CutOffLinePlayhead.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/CutOffLinePlayhead.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f2eff39f8c1643249876a9086cd75edd 3 | timeCreated: 1501053711 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/CutOffTimeCursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/CutOffTimeCursor.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/CutOffTimeCursor.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 762cad0463b66b34eb0ba802f27f6e9c 3 | timeCreated: 1517993184 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/KeyCircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/KeyCircle.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/KeyCircle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39079eddaf5c60840ac5026a3f1ca5b2 3 | timeCreated: 1513587384 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/KeyDiamond.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/KeyDiamond.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/KeyDiamond.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78931cee83c3c704d926a2008174070b 3 | timeCreated: 1513587384 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/KeySquare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/KeySquare.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/KeySquare.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 373eeacddb4530c4b859d651e966cdd9 3 | timeCreated: 1513587384 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 2048 71 | textureFormat: -1 72 | textureCompression: 1 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | spriteSheet: 78 | serializedVersion: 2 79 | sprites: [] 80 | outline: [] 81 | spritePackingTag: 82 | userData: 83 | assetBundleName: 84 | assetBundleVariant: 85 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/Playhead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/Playhead.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/Playhead.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dcb0886e22af35246ad34f84f3bfac26 3 | timeCreated: 1501053660 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/SettingsIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/SettingsIcon.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/SettingsIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2864fc60d0a2f994c86e91d50eda2100 3 | timeCreated: 1501058079 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/StopIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/StopIcon.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/StopIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0c405a5cc014c1449617e635cdd5056 3 | timeCreated: 1501057681 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/Timecursor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tinyantstudio/SimpleTimeLineWindow/ae377bb05889671830e163d32f29fd0a2d76e864/Assets/SimpleTimeLineWindow/EditorResources/Timecursor.png -------------------------------------------------------------------------------- /Assets/SimpleTimeLineWindow/EditorResources/Timecursor.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78babcc73883a9047898775fd1507339 3 | timeCreated: 1517992637 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 0 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 1 28 | maxTextureSize: 2048 29 | textureSettings: 30 | filterMode: -1 31 | aniso: 1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 0 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 2 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 2048 55 | textureFormat: -1 56 | textureCompression: 1 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 2048 63 | textureFormat: -1 64 | textureCompression: 1 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | spriteSheet: 70 | serializedVersion: 2 71 | sprites: [] 72 | outline: [] 73 | spritePackingTag: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 tinyant 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.unity.ads": "2.0.8", 4 | "com.unity.analytics": "2.0.16", 5 | "com.unity.package-manager-ui": "1.9.11", 6 | "com.unity.purchasing": "2.0.3", 7 | "com.unity.textmeshpro": "1.2.4", 8 | "com.unity.modules.ai": "1.0.0", 9 | "com.unity.modules.animation": "1.0.0", 10 | "com.unity.modules.assetbundle": "1.0.0", 11 | "com.unity.modules.audio": "1.0.0", 12 | "com.unity.modules.cloth": "1.0.0", 13 | "com.unity.modules.director": "1.0.0", 14 | "com.unity.modules.imageconversion": "1.0.0", 15 | "com.unity.modules.imgui": "1.0.0", 16 | "com.unity.modules.jsonserialize": "1.0.0", 17 | "com.unity.modules.particlesystem": "1.0.0", 18 | "com.unity.modules.physics": "1.0.0", 19 | "com.unity.modules.physics2d": "1.0.0", 20 | "com.unity.modules.screencapture": "1.0.0", 21 | "com.unity.modules.terrain": "1.0.0", 22 | "com.unity.modules.terrainphysics": "1.0.0", 23 | "com.unity.modules.tilemap": "1.0.0", 24 | "com.unity.modules.ui": "1.0.0", 25 | "com.unity.modules.uielements": "1.0.0", 26 | "com.unity.modules.umbra": "1.0.0", 27 | "com.unity.modules.unityanalytics": "1.0.0", 28 | "com.unity.modules.unitywebrequest": "1.0.0", 29 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 30 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 31 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 32 | "com.unity.modules.unitywebrequestwww": "1.0.0", 33 | "com.unity.modules.vehicles": "1.0.0", 34 | "com.unity.modules.video": "1.0.0", 35 | "com.unity.modules.vr": "1.0.0", 36 | "com.unity.modules.wind": "1.0.0", 37 | "com.unity.modules.xr": "1.0.0" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 1024 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_AmbisonicDecoderPlugin: 16 | m_DisableAudio: 0 17 | m_VirtualizeEffects: 1 18 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0 18 | m_ClothInterCollisionStiffness: 0 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 1 23 | m_ClothInterCollisionSettingsToggle: 0 24 | m_ContactPairsMode: 0 25 | m_BroadphaseType: 0 26 | m_WorldBounds: 27 | m_Center: {x: 0, y: 0, z: 0} 28 | m_Extent: {x: 250, y: 250, z: 250} 29 | m_WorldSubdivisions: 8 30 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Scenes/SampleScene.unity 10 | guid: 99c9720ab356a0642a771bea13969a05 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 7 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_SpritePackerMode: 0 12 | m_SpritePackerPaddingPower: 1 13 | m_EtcTextureCompressorBehavior: 1 14 | m_EtcTextureFastCompressor: 1 15 | m_EtcTextureNormalCompressor: 2 16 | m_EtcTextureBestCompressor: 4 17 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 18 | m_ProjectGenerationRootNamespace: 19 | m_UserGeneratedProjectSuffix: 20 | m_CollabEditorSettings: 21 | inProgressEnabled: 1 22 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 12 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | m_PreloadedShaders: [] 39 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 40 | type: 0} 41 | m_CustomRenderPipeline: {fileID: 0} 42 | m_TransparencySortMode: 0 43 | m_TransparencySortAxis: {x: 0, y: 0, z: 1} 44 | m_DefaultRenderingPath: 1 45 | m_DefaultMobileRenderingPath: 1 46 | m_TierSettings: [] 47 | m_LightmapStripping: 0 48 | m_FogStripping: 0 49 | m_InstancingStripping: 0 50 | m_LightmapKeepPlain: 1 51 | m_LightmapKeepDirCombined: 1 52 | m_LightmapKeepDynamicPlain: 1 53 | m_LightmapKeepDynamicDirCombined: 1 54 | m_LightmapKeepShadowMask: 1 55 | m_LightmapKeepSubtractive: 1 56 | m_FogKeepLinear: 1 57 | m_FogKeepExp: 1 58 | m_FogKeepExp2: 1 59 | m_AlbedoSwatchInfos: [] 60 | m_LightsUseLinearIntensity: 0 61 | m_LightsUseColorTemperature: 0 62 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left shift 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | m_DefaultList: 7 | - type: 8 | m_NativeTypeID: 108 9 | m_ManagedTypePPtr: {fileID: 0} 10 | m_ManagedTypeFallback: 11 | defaultPresets: 12 | - m_Preset: {fileID: 2655988077585873504, guid: c1cf8506f04ef2c4a88b64b6c4202eea, 13 | type: 2} 14 | - type: 15 | m_NativeTypeID: 1020 16 | m_ManagedTypePPtr: {fileID: 0} 17 | m_ManagedTypeFallback: 18 | defaultPresets: 19 | - m_Preset: {fileID: 2655988077585873504, guid: 0cd792cc87e492d43b4e95b205fc5cc6, 20 | type: 2} 21 | - type: 22 | m_NativeTypeID: 1006 23 | m_ManagedTypePPtr: {fileID: 0} 24 | m_ManagedTypeFallback: 25 | defaultPresets: 26 | - m_Preset: {fileID: 2655988077585873504, guid: 7a99f8aa944efe94cb9bd74562b7d5f9, 27 | type: 2} 28 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 15 7 | productGUID: 3308a0f4425764544b86fb9dba2d7380 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | AndroidEnableSustainedPerformanceMode: 0 11 | defaultScreenOrientation: 4 12 | targetDevice: 2 13 | useOnDemandResources: 0 14 | accelerometerFrequency: 60 15 | companyName: DefaultCompany 16 | productName: SimpleTimeLineWindow 17 | defaultCursor: {fileID: 0} 18 | cursorHotspot: {x: 0, y: 0} 19 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 20 | m_ShowUnitySplashScreen: 1 21 | m_ShowUnitySplashLogo: 1 22 | m_SplashScreenOverlayOpacity: 1 23 | m_SplashScreenAnimation: 1 24 | m_SplashScreenLogoStyle: 1 25 | m_SplashScreenDrawMode: 0 26 | m_SplashScreenBackgroundAnimationZoom: 1 27 | m_SplashScreenLogoAnimationZoom: 1 28 | m_SplashScreenBackgroundLandscapeAspect: 1 29 | m_SplashScreenBackgroundPortraitAspect: 1 30 | m_SplashScreenBackgroundLandscapeUvs: 31 | serializedVersion: 2 32 | x: 0 33 | y: 0 34 | width: 1 35 | height: 1 36 | m_SplashScreenBackgroundPortraitUvs: 37 | serializedVersion: 2 38 | x: 0 39 | y: 0 40 | width: 1 41 | height: 1 42 | m_SplashScreenLogos: [] 43 | m_VirtualRealitySplashScreen: {fileID: 0} 44 | m_HolographicTrackingLossScreen: {fileID: 0} 45 | defaultScreenWidth: 1024 46 | defaultScreenHeight: 768 47 | defaultScreenWidthWeb: 960 48 | defaultScreenHeightWeb: 600 49 | m_StereoRenderingPath: 0 50 | m_ActiveColorSpace: 0 51 | m_MTRendering: 1 52 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 53 | iosShowActivityIndicatorOnLoading: -1 54 | androidShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | preserveFramebufferAlpha: 0 65 | disableDepthAndStencilBuffers: 0 66 | androidBlitType: 0 67 | defaultIsNativeResolution: 1 68 | macRetinaSupport: 1 69 | runInBackground: 1 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | deferSystemGesturesMode: 0 75 | hideHomeButton: 0 76 | submitAnalytics: 1 77 | usePlayerLog: 1 78 | bakeCollisionMeshes: 0 79 | forceSingleInstance: 0 80 | resizableWindow: 0 81 | useMacAppStoreValidation: 0 82 | macAppStoreCategory: public.app-category.games 83 | gpuSkinning: 1 84 | graphicsJobs: 0 85 | xboxPIXTextureCapture: 0 86 | xboxEnableAvatar: 0 87 | xboxEnableKinect: 0 88 | xboxEnableKinectAutoTracking: 0 89 | xboxEnableFitness: 0 90 | visibleInBackground: 1 91 | allowFullscreenSwitch: 1 92 | graphicsJobMode: 0 93 | fullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | metalFramebufferOnly: 0 99 | n3dsDisableStereoscopicView: 0 100 | n3dsEnableSharedListOpt: 1 101 | n3dsEnableVSync: 0 102 | xboxOneResolution: 0 103 | xboxOneSResolution: 0 104 | xboxOneXResolution: 3 105 | xboxOneMonoLoggingLevel: 0 106 | xboxOneLoggingLevel: 1 107 | xboxOneDisableEsram: 0 108 | xboxOnePresentImmediateThreshold: 0 109 | switchQueueCommandMemory: 0 110 | videoMemoryForVertexBuffers: 0 111 | psp2PowerMode: 0 112 | psp2AcquireBGM: 1 113 | vulkanEnableSetSRGBWrite: 0 114 | vulkanUseSWCommandBuffers: 0 115 | m_SupportedAspectRatios: 116 | 4:3: 1 117 | 5:4: 1 118 | 16:10: 1 119 | 16:9: 1 120 | Others: 1 121 | bundleVersion: 0.1 122 | preloadedAssets: [] 123 | metroInputSource: 0 124 | wsaTransparentSwapchain: 0 125 | m_HolographicPauseOnTrackingLoss: 1 126 | xboxOneDisableKinectGpuReservation: 0 127 | xboxOneEnable7thCore: 0 128 | vrSettings: 129 | cardboard: 130 | depthFormat: 0 131 | enableTransitionView: 0 132 | daydream: 133 | depthFormat: 0 134 | useSustainedPerformanceMode: 0 135 | enableVideoLayer: 0 136 | useProtectedVideoMemory: 0 137 | minimumSupportedHeadTracking: 0 138 | maximumSupportedHeadTracking: 1 139 | hololens: 140 | depthFormat: 1 141 | depthBufferSharingEnabled: 0 142 | oculus: 143 | sharedDepthBuffer: 0 144 | dashSupport: 0 145 | enable360StereoCapture: 0 146 | protectGraphicsMemory: 0 147 | useHDRDisplay: 0 148 | m_ColorGamuts: 00000000 149 | targetPixelDensity: 30 150 | resolutionScalingMode: 0 151 | androidSupportedAspectRatio: 1 152 | androidMaxAspectRatio: 2.1 153 | applicationIdentifier: {} 154 | buildNumber: {} 155 | AndroidBundleVersionCode: 1 156 | AndroidMinSdkVersion: 16 157 | AndroidTargetSdkVersion: 0 158 | AndroidPreferredInstallLocation: 1 159 | aotOptions: 160 | stripEngineCode: 1 161 | iPhoneStrippingLevel: 0 162 | iPhoneScriptCallOptimization: 0 163 | ForceInternetPermission: 0 164 | ForceSDCardPermission: 0 165 | CreateWallpaper: 0 166 | APKExpansionFiles: 0 167 | keepLoadedShadersAlive: 0 168 | StripUnusedMeshComponents: 1 169 | VertexChannelCompressionMask: 4054 170 | iPhoneSdkVersion: 988 171 | iOSTargetOSVersionString: 8.0 172 | tvOSSdkVersion: 0 173 | tvOSRequireExtendedGameController: 0 174 | tvOSTargetOSVersionString: 9.0 175 | uIPrerenderedIcon: 0 176 | uIRequiresPersistentWiFi: 0 177 | uIRequiresFullScreen: 1 178 | uIStatusBarHidden: 1 179 | uIExitOnSuspend: 0 180 | uIStatusBarStyle: 0 181 | iPhoneSplashScreen: {fileID: 0} 182 | iPhoneHighResSplashScreen: {fileID: 0} 183 | iPhoneTallHighResSplashScreen: {fileID: 0} 184 | iPhone47inSplashScreen: {fileID: 0} 185 | iPhone55inPortraitSplashScreen: {fileID: 0} 186 | iPhone55inLandscapeSplashScreen: {fileID: 0} 187 | iPhone58inPortraitSplashScreen: {fileID: 0} 188 | iPhone58inLandscapeSplashScreen: {fileID: 0} 189 | iPadPortraitSplashScreen: {fileID: 0} 190 | iPadHighResPortraitSplashScreen: {fileID: 0} 191 | iPadLandscapeSplashScreen: {fileID: 0} 192 | iPadHighResLandscapeSplashScreen: {fileID: 0} 193 | appleTVSplashScreen: {fileID: 0} 194 | appleTVSplashScreen2x: {fileID: 0} 195 | tvOSSmallIconLayers: [] 196 | tvOSSmallIconLayers2x: [] 197 | tvOSLargeIconLayers: [] 198 | tvOSLargeIconLayers2x: [] 199 | tvOSTopShelfImageLayers: [] 200 | tvOSTopShelfImageLayers2x: [] 201 | tvOSTopShelfImageWideLayers: [] 202 | tvOSTopShelfImageWideLayers2x: [] 203 | iOSLaunchScreenType: 0 204 | iOSLaunchScreenPortrait: {fileID: 0} 205 | iOSLaunchScreenLandscape: {fileID: 0} 206 | iOSLaunchScreenBackgroundColor: 207 | serializedVersion: 2 208 | rgba: 0 209 | iOSLaunchScreenFillPct: 100 210 | iOSLaunchScreenSize: 100 211 | iOSLaunchScreenCustomXibPath: 212 | iOSLaunchScreeniPadType: 0 213 | iOSLaunchScreeniPadImage: {fileID: 0} 214 | iOSLaunchScreeniPadBackgroundColor: 215 | serializedVersion: 2 216 | rgba: 0 217 | iOSLaunchScreeniPadFillPct: 100 218 | iOSLaunchScreeniPadSize: 100 219 | iOSLaunchScreeniPadCustomXibPath: 220 | iOSUseLaunchScreenStoryboard: 0 221 | iOSLaunchScreenCustomStoryboardPath: 222 | iOSDeviceRequirements: [] 223 | iOSURLSchemes: [] 224 | iOSBackgroundModes: 0 225 | iOSMetalForceHardShadows: 0 226 | metalEditorSupport: 1 227 | metalAPIValidation: 1 228 | iOSRenderExtraFrameOnPause: 0 229 | appleDeveloperTeamID: 230 | iOSManualSigningProvisioningProfileID: 231 | tvOSManualSigningProvisioningProfileID: 232 | iOSManualSigningProvisioningProfileType: 0 233 | tvOSManualSigningProvisioningProfileType: 0 234 | appleEnableAutomaticSigning: 0 235 | iOSRequireARKit: 0 236 | appleEnableProMotion: 0 237 | vulkanEditorSupport: 0 238 | clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea 239 | templatePackageId: com.unity.3d@1.0.2 240 | templateDefaultScene: Assets/Scenes/SampleScene.unity 241 | AndroidTargetArchitectures: 5 242 | AndroidSplashScreenScale: 0 243 | androidSplashScreen: {fileID: 0} 244 | AndroidKeystoreName: 245 | AndroidKeyaliasName: 246 | AndroidBuildApkPerCpuArchitecture: 0 247 | AndroidTVCompatibility: 1 248 | AndroidIsGame: 1 249 | AndroidEnableTango: 0 250 | androidEnableBanner: 1 251 | androidUseLowAccuracyLocation: 0 252 | m_AndroidBanners: 253 | - width: 320 254 | height: 180 255 | banner: {fileID: 0} 256 | androidGamepadSupportLevel: 0 257 | resolutionDialogBanner: {fileID: 0} 258 | m_BuildTargetIcons: [] 259 | m_BuildTargetPlatformIcons: [] 260 | m_BuildTargetBatching: 261 | - m_BuildTarget: Standalone 262 | m_StaticBatching: 1 263 | m_DynamicBatching: 0 264 | - m_BuildTarget: tvOS 265 | m_StaticBatching: 1 266 | m_DynamicBatching: 0 267 | - m_BuildTarget: Android 268 | m_StaticBatching: 1 269 | m_DynamicBatching: 0 270 | - m_BuildTarget: iPhone 271 | m_StaticBatching: 1 272 | m_DynamicBatching: 0 273 | - m_BuildTarget: WebGL 274 | m_StaticBatching: 0 275 | m_DynamicBatching: 0 276 | m_BuildTargetGraphicsAPIs: 277 | - m_BuildTarget: AndroidPlayer 278 | m_APIs: 0b00000015000000 279 | m_Automatic: 1 280 | - m_BuildTarget: iOSSupport 281 | m_APIs: 10000000 282 | m_Automatic: 1 283 | - m_BuildTarget: AppleTVSupport 284 | m_APIs: 10000000 285 | m_Automatic: 0 286 | - m_BuildTarget: WebGLSupport 287 | m_APIs: 0b000000 288 | m_Automatic: 1 289 | m_BuildTargetVRSettings: 290 | - m_BuildTarget: Standalone 291 | m_Enabled: 0 292 | m_Devices: 293 | - Oculus 294 | - OpenVR 295 | m_BuildTargetEnableVuforiaSettings: [] 296 | openGLRequireES31: 0 297 | openGLRequireES31AEP: 0 298 | m_TemplateCustomTags: {} 299 | mobileMTRendering: 300 | Android: 1 301 | iPhone: 1 302 | tvOS: 1 303 | m_BuildTargetGroupLightmapEncodingQuality: [] 304 | m_BuildTargetGroupLightmapSettings: [] 305 | playModeTestRunnerEnabled: 0 306 | runPlayModeTestAsEditModeTest: 0 307 | actionOnDotNetUnhandledException: 1 308 | enableInternalProfiler: 0 309 | logObjCUncaughtExceptions: 1 310 | enableCrashReportAPI: 0 311 | cameraUsageDescription: 312 | locationUsageDescription: 313 | microphoneUsageDescription: 314 | switchNetLibKey: 315 | switchSocketMemoryPoolSize: 6144 316 | switchSocketAllocatorPoolSize: 128 317 | switchSocketConcurrencyLimit: 14 318 | switchScreenResolutionBehavior: 2 319 | switchUseCPUProfiler: 0 320 | switchApplicationID: 0x01004b9000490000 321 | switchNSODependencies: 322 | switchTitleNames_0: 323 | switchTitleNames_1: 324 | switchTitleNames_2: 325 | switchTitleNames_3: 326 | switchTitleNames_4: 327 | switchTitleNames_5: 328 | switchTitleNames_6: 329 | switchTitleNames_7: 330 | switchTitleNames_8: 331 | switchTitleNames_9: 332 | switchTitleNames_10: 333 | switchTitleNames_11: 334 | switchTitleNames_12: 335 | switchTitleNames_13: 336 | switchTitleNames_14: 337 | switchPublisherNames_0: 338 | switchPublisherNames_1: 339 | switchPublisherNames_2: 340 | switchPublisherNames_3: 341 | switchPublisherNames_4: 342 | switchPublisherNames_5: 343 | switchPublisherNames_6: 344 | switchPublisherNames_7: 345 | switchPublisherNames_8: 346 | switchPublisherNames_9: 347 | switchPublisherNames_10: 348 | switchPublisherNames_11: 349 | switchPublisherNames_12: 350 | switchPublisherNames_13: 351 | switchPublisherNames_14: 352 | switchIcons_0: {fileID: 0} 353 | switchIcons_1: {fileID: 0} 354 | switchIcons_2: {fileID: 0} 355 | switchIcons_3: {fileID: 0} 356 | switchIcons_4: {fileID: 0} 357 | switchIcons_5: {fileID: 0} 358 | switchIcons_6: {fileID: 0} 359 | switchIcons_7: {fileID: 0} 360 | switchIcons_8: {fileID: 0} 361 | switchIcons_9: {fileID: 0} 362 | switchIcons_10: {fileID: 0} 363 | switchIcons_11: {fileID: 0} 364 | switchIcons_12: {fileID: 0} 365 | switchIcons_13: {fileID: 0} 366 | switchIcons_14: {fileID: 0} 367 | switchSmallIcons_0: {fileID: 0} 368 | switchSmallIcons_1: {fileID: 0} 369 | switchSmallIcons_2: {fileID: 0} 370 | switchSmallIcons_3: {fileID: 0} 371 | switchSmallIcons_4: {fileID: 0} 372 | switchSmallIcons_5: {fileID: 0} 373 | switchSmallIcons_6: {fileID: 0} 374 | switchSmallIcons_7: {fileID: 0} 375 | switchSmallIcons_8: {fileID: 0} 376 | switchSmallIcons_9: {fileID: 0} 377 | switchSmallIcons_10: {fileID: 0} 378 | switchSmallIcons_11: {fileID: 0} 379 | switchSmallIcons_12: {fileID: 0} 380 | switchSmallIcons_13: {fileID: 0} 381 | switchSmallIcons_14: {fileID: 0} 382 | switchManualHTML: 383 | switchAccessibleURLs: 384 | switchLegalInformation: 385 | switchMainThreadStackSize: 1048576 386 | switchPresenceGroupId: 387 | switchLogoHandling: 0 388 | switchReleaseVersion: 0 389 | switchDisplayVersion: 1.0.0 390 | switchStartupUserAccount: 0 391 | switchTouchScreenUsage: 0 392 | switchSupportedLanguagesMask: 0 393 | switchLogoType: 0 394 | switchApplicationErrorCodeCategory: 395 | switchUserAccountSaveDataSize: 0 396 | switchUserAccountSaveDataJournalSize: 0 397 | switchApplicationAttribute: 0 398 | switchCardSpecSize: -1 399 | switchCardSpecClock: -1 400 | switchRatingsMask: 0 401 | switchRatingsInt_0: 0 402 | switchRatingsInt_1: 0 403 | switchRatingsInt_2: 0 404 | switchRatingsInt_3: 0 405 | switchRatingsInt_4: 0 406 | switchRatingsInt_5: 0 407 | switchRatingsInt_6: 0 408 | switchRatingsInt_7: 0 409 | switchRatingsInt_8: 0 410 | switchRatingsInt_9: 0 411 | switchRatingsInt_10: 0 412 | switchRatingsInt_11: 0 413 | switchLocalCommunicationIds_0: 414 | switchLocalCommunicationIds_1: 415 | switchLocalCommunicationIds_2: 416 | switchLocalCommunicationIds_3: 417 | switchLocalCommunicationIds_4: 418 | switchLocalCommunicationIds_5: 419 | switchLocalCommunicationIds_6: 420 | switchLocalCommunicationIds_7: 421 | switchParentalControl: 0 422 | switchAllowsScreenshot: 1 423 | switchAllowsVideoCapturing: 1 424 | switchAllowsRuntimeAddOnContentInstall: 0 425 | switchDataLossConfirmation: 0 426 | switchSupportedNpadStyles: 3 427 | switchNativeFsCacheSize: 32 428 | switchIsHoldTypeHorizontal: 0 429 | switchSupportedNpadCount: 8 430 | switchSocketConfigEnabled: 0 431 | switchTcpInitialSendBufferSize: 32 432 | switchTcpInitialReceiveBufferSize: 64 433 | switchTcpAutoSendBufferSizeMax: 256 434 | switchTcpAutoReceiveBufferSizeMax: 256 435 | switchUdpSendBufferSize: 9 436 | switchUdpReceiveBufferSize: 42 437 | switchSocketBufferEfficiency: 4 438 | switchSocketInitializeEnabled: 1 439 | switchNetworkInterfaceManagerInitializeEnabled: 1 440 | switchPlayerConnectionEnabled: 1 441 | ps4NPAgeRating: 12 442 | ps4NPTitleSecret: 443 | ps4NPTrophyPackPath: 444 | ps4ParentalLevel: 11 445 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 446 | ps4Category: 0 447 | ps4MasterVersion: 01.00 448 | ps4AppVersion: 01.00 449 | ps4AppType: 0 450 | ps4ParamSfxPath: 451 | ps4VideoOutPixelFormat: 0 452 | ps4VideoOutInitialWidth: 1920 453 | ps4VideoOutBaseModeInitialWidth: 1920 454 | ps4VideoOutReprojectionRate: 60 455 | ps4PronunciationXMLPath: 456 | ps4PronunciationSIGPath: 457 | ps4BackgroundImagePath: 458 | ps4StartupImagePath: 459 | ps4StartupImagesFolder: 460 | ps4IconImagesFolder: 461 | ps4SaveDataImagePath: 462 | ps4SdkOverride: 463 | ps4BGMPath: 464 | ps4ShareFilePath: 465 | ps4ShareOverlayImagePath: 466 | ps4PrivacyGuardImagePath: 467 | ps4NPtitleDatPath: 468 | ps4RemotePlayKeyAssignment: -1 469 | ps4RemotePlayKeyMappingDir: 470 | ps4PlayTogetherPlayerCount: 0 471 | ps4EnterButtonAssignment: 1 472 | ps4ApplicationParam1: 0 473 | ps4ApplicationParam2: 0 474 | ps4ApplicationParam3: 0 475 | ps4ApplicationParam4: 0 476 | ps4DownloadDataSize: 0 477 | ps4GarlicHeapSize: 2048 478 | ps4ProGarlicHeapSize: 2560 479 | ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ 480 | ps4pnSessions: 1 481 | ps4pnPresence: 1 482 | ps4pnFriends: 1 483 | ps4pnGameCustomData: 1 484 | playerPrefsSupport: 0 485 | enableApplicationExit: 0 486 | restrictedAudioUsageRights: 0 487 | ps4UseResolutionFallback: 0 488 | ps4ReprojectionSupport: 0 489 | ps4UseAudio3dBackend: 0 490 | ps4SocialScreenEnabled: 0 491 | ps4ScriptOptimizationLevel: 0 492 | ps4Audio3dVirtualSpeakerCount: 14 493 | ps4attribCpuUsage: 0 494 | ps4PatchPkgPath: 495 | ps4PatchLatestPkgPath: 496 | ps4PatchChangeinfoPath: 497 | ps4PatchDayOne: 0 498 | ps4attribUserManagement: 0 499 | ps4attribMoveSupport: 0 500 | ps4attrib3DSupport: 0 501 | ps4attribShareSupport: 0 502 | ps4attribExclusiveVR: 0 503 | ps4disableAutoHideSplash: 0 504 | ps4videoRecordingFeaturesUsed: 0 505 | ps4contentSearchFeaturesUsed: 0 506 | ps4attribEyeToEyeDistanceSettingVR: 0 507 | ps4IncludedModules: [] 508 | monoEnv: 509 | psp2Splashimage: {fileID: 0} 510 | psp2NPTrophyPackPath: 511 | psp2NPSupportGBMorGJP: 0 512 | psp2NPAgeRating: 12 513 | psp2NPTitleDatPath: 514 | psp2NPCommsID: 515 | psp2NPCommunicationsID: 516 | psp2NPCommsPassphrase: 517 | psp2NPCommsSig: 518 | psp2ParamSfxPath: 519 | psp2ManualPath: 520 | psp2LiveAreaGatePath: 521 | psp2LiveAreaBackroundPath: 522 | psp2LiveAreaPath: 523 | psp2LiveAreaTrialPath: 524 | psp2PatchChangeInfoPath: 525 | psp2PatchOriginalPackage: 526 | psp2PackagePassword: F69AzBlax3CF3EDNhm3soLBPh71Yexui 527 | psp2KeystoneFile: 528 | psp2MemoryExpansionMode: 0 529 | psp2DRMType: 0 530 | psp2StorageType: 0 531 | psp2MediaCapacity: 0 532 | psp2DLCConfigPath: 533 | psp2ThumbnailPath: 534 | psp2BackgroundPath: 535 | psp2SoundPath: 536 | psp2TrophyCommId: 537 | psp2TrophyPackagePath: 538 | psp2PackagedResourcesPath: 539 | psp2SaveDataQuota: 10240 540 | psp2ParentalLevel: 1 541 | psp2ShortTitle: Not Set 542 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 543 | psp2Category: 0 544 | psp2MasterVersion: 01.00 545 | psp2AppVersion: 01.00 546 | psp2TVBootMode: 0 547 | psp2EnterButtonAssignment: 2 548 | psp2TVDisableEmu: 0 549 | psp2AllowTwitterDialog: 1 550 | psp2Upgradable: 0 551 | psp2HealthWarning: 0 552 | psp2UseLibLocation: 0 553 | psp2InfoBarOnStartup: 0 554 | psp2InfoBarColor: 0 555 | psp2ScriptOptimizationLevel: 0 556 | splashScreenBackgroundSourceLandscape: {fileID: 0} 557 | splashScreenBackgroundSourcePortrait: {fileID: 0} 558 | spritePackerPolicy: 559 | webGLMemorySize: 256 560 | webGLExceptionSupport: 1 561 | webGLNameFilesAsHashes: 0 562 | webGLDataCaching: 1 563 | webGLDebugSymbols: 0 564 | webGLEmscriptenArgs: 565 | webGLModulesDirectory: 566 | webGLTemplate: APPLICATION:Default 567 | webGLAnalyzeBuildSize: 0 568 | webGLUseEmbeddedResources: 0 569 | webGLCompressionFormat: 1 570 | webGLLinkerTarget: 1 571 | scriptingDefineSymbols: {} 572 | platformArchitecture: {} 573 | scriptingBackend: {} 574 | il2cppCompilerConfiguration: {} 575 | incrementalIl2cppBuild: {} 576 | allowUnsafeCode: 0 577 | additionalIl2CppArgs: 578 | scriptingRuntimeVersion: 0 579 | apiCompatibilityLevelPerPlatform: {} 580 | m_RenderingPath: 1 581 | m_MobileRenderingPath: 1 582 | metroPackageName: Template_3D 583 | metroPackageVersion: 584 | metroCertificatePath: 585 | metroCertificatePassword: 586 | metroCertificateSubject: 587 | metroCertificateIssuer: 588 | metroCertificateNotAfter: 0000000000000000 589 | metroApplicationDescription: Template_3D 590 | wsaImages: {} 591 | metroTileShortName: 592 | metroTileShowName: 0 593 | metroMediumTileShowName: 0 594 | metroLargeTileShowName: 0 595 | metroWideTileShowName: 0 596 | metroDefaultTileSize: 1 597 | metroTileForegroundText: 2 598 | metroTileBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21568628, a: 0} 599 | metroSplashScreenBackgroundColor: {r: 0.12941177, g: 0.17254902, b: 0.21568628, 600 | a: 1} 601 | metroSplashScreenUseBackgroundColor: 0 602 | platformCapabilities: {} 603 | metroFTAName: 604 | metroFTAFileTypes: [] 605 | metroProtocolName: 606 | metroCompilationOverrides: 1 607 | n3dsUseExtSaveData: 0 608 | n3dsCompressStaticMem: 1 609 | n3dsExtSaveDataNumber: 0x12345 610 | n3dsStackSize: 131072 611 | n3dsTargetPlatform: 2 612 | n3dsRegion: 7 613 | n3dsMediaSize: 0 614 | n3dsLogoStyle: 3 615 | n3dsTitle: GameName 616 | n3dsProductCode: 617 | n3dsApplicationId: 0xFF3FF 618 | XboxOneProductId: 619 | XboxOneUpdateKey: 620 | XboxOneSandboxId: 621 | XboxOneContentId: 622 | XboxOneTitleId: 623 | XboxOneSCId: 624 | XboxOneGameOsOverridePath: 625 | XboxOnePackagingOverridePath: 626 | XboxOneAppManifestOverridePath: 627 | XboxOneVersion: 1.0.0.0 628 | XboxOnePackageEncryption: 0 629 | XboxOnePackageUpdateGranularity: 2 630 | XboxOneDescription: 631 | XboxOneLanguage: 632 | - enus 633 | XboxOneCapability: [] 634 | XboxOneGameRating: {} 635 | XboxOneIsContentPackage: 0 636 | XboxOneEnableGPUVariability: 0 637 | XboxOneSockets: {} 638 | XboxOneSplashScreen: {fileID: 0} 639 | XboxOneAllowedProductIds: [] 640 | XboxOnePersistentLocalStorageSize: 0 641 | XboxOneXTitleMemory: 8 642 | xboxOneScriptCompiler: 0 643 | vrEditorSettings: 644 | daydream: 645 | daydreamIconForeground: {fileID: 0} 646 | daydreamIconBackground: {fileID: 0} 647 | cloudServicesEnabled: 648 | UNet: 1 649 | facebookSdkVersion: 7.9.4 650 | apiCompatibilityLevel: 2 651 | cloudProjectId: 10e64ff0-e276-4966-bd1f-7a6f385eec04 652 | projectName: SimpleTimeLineWindow 653 | organizationId: tinyant 654 | cloudEnabled: 0 655 | enableNativePlatformBackendsForNewInputSystem: 0 656 | disableOldInputManagerSupport: 0 657 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2018.2.0f2 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 4 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Very Low 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | shadowmaskMode: 0 21 | blendWeights: 1 22 | textureQuality: 1 23 | anisotropicTextures: 0 24 | antiAliasing: 0 25 | softParticles: 0 26 | softVegetation: 0 27 | realtimeReflectionProbes: 0 28 | billboardsFaceCameraPosition: 0 29 | vSyncCount: 0 30 | lodBias: 0.3 31 | maximumLODLevel: 0 32 | particleRaycastBudget: 4 33 | asyncUploadTimeSlice: 2 34 | asyncUploadBufferSize: 4 35 | resolutionScalingFixedDPIFactor: 1 36 | excludedTargetPlatforms: [] 37 | - serializedVersion: 2 38 | name: Low 39 | pixelLightCount: 0 40 | shadows: 0 41 | shadowResolution: 0 42 | shadowProjection: 1 43 | shadowCascades: 1 44 | shadowDistance: 20 45 | shadowNearPlaneOffset: 3 46 | shadowCascade2Split: 0.33333334 47 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 48 | shadowmaskMode: 0 49 | blendWeights: 2 50 | textureQuality: 0 51 | anisotropicTextures: 0 52 | antiAliasing: 0 53 | softParticles: 0 54 | softVegetation: 0 55 | realtimeReflectionProbes: 0 56 | billboardsFaceCameraPosition: 0 57 | vSyncCount: 0 58 | lodBias: 0.4 59 | maximumLODLevel: 0 60 | particleRaycastBudget: 16 61 | asyncUploadTimeSlice: 2 62 | asyncUploadBufferSize: 4 63 | resolutionScalingFixedDPIFactor: 1 64 | excludedTargetPlatforms: [] 65 | - serializedVersion: 2 66 | name: Medium 67 | pixelLightCount: 1 68 | shadows: 1 69 | shadowResolution: 0 70 | shadowProjection: 1 71 | shadowCascades: 1 72 | shadowDistance: 20 73 | shadowNearPlaneOffset: 3 74 | shadowCascade2Split: 0.33333334 75 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 76 | shadowmaskMode: 0 77 | blendWeights: 2 78 | textureQuality: 0 79 | anisotropicTextures: 1 80 | antiAliasing: 0 81 | softParticles: 0 82 | softVegetation: 0 83 | realtimeReflectionProbes: 0 84 | billboardsFaceCameraPosition: 0 85 | vSyncCount: 1 86 | lodBias: 0.7 87 | maximumLODLevel: 0 88 | particleRaycastBudget: 64 89 | asyncUploadTimeSlice: 2 90 | asyncUploadBufferSize: 4 91 | resolutionScalingFixedDPIFactor: 1 92 | excludedTargetPlatforms: [] 93 | - serializedVersion: 2 94 | name: High 95 | pixelLightCount: 2 96 | shadows: 2 97 | shadowResolution: 1 98 | shadowProjection: 1 99 | shadowCascades: 2 100 | shadowDistance: 40 101 | shadowNearPlaneOffset: 3 102 | shadowCascade2Split: 0.33333334 103 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 104 | shadowmaskMode: 1 105 | blendWeights: 2 106 | textureQuality: 0 107 | anisotropicTextures: 1 108 | antiAliasing: 2 109 | softParticles: 0 110 | softVegetation: 1 111 | realtimeReflectionProbes: 1 112 | billboardsFaceCameraPosition: 1 113 | vSyncCount: 1 114 | lodBias: 1 115 | maximumLODLevel: 0 116 | particleRaycastBudget: 256 117 | asyncUploadTimeSlice: 2 118 | asyncUploadBufferSize: 4 119 | resolutionScalingFixedDPIFactor: 1 120 | excludedTargetPlatforms: [] 121 | - serializedVersion: 2 122 | name: Very High 123 | pixelLightCount: 3 124 | shadows: 2 125 | shadowResolution: 2 126 | shadowProjection: 1 127 | shadowCascades: 2 128 | shadowDistance: 40 129 | shadowNearPlaneOffset: 3 130 | shadowCascade2Split: 0.33333334 131 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 132 | shadowmaskMode: 1 133 | blendWeights: 4 134 | textureQuality: 0 135 | anisotropicTextures: 1 136 | antiAliasing: 4 137 | softParticles: 1 138 | softVegetation: 1 139 | realtimeReflectionProbes: 1 140 | billboardsFaceCameraPosition: 1 141 | vSyncCount: 1 142 | lodBias: 1.5 143 | maximumLODLevel: 0 144 | particleRaycastBudget: 1024 145 | asyncUploadTimeSlice: 2 146 | asyncUploadBufferSize: 4 147 | resolutionScalingFixedDPIFactor: 1 148 | excludedTargetPlatforms: [] 149 | - serializedVersion: 2 150 | name: Ultra 151 | pixelLightCount: 4 152 | shadows: 2 153 | shadowResolution: 2 154 | shadowProjection: 1 155 | shadowCascades: 4 156 | shadowDistance: 150 157 | shadowNearPlaneOffset: 3 158 | shadowCascade2Split: 0.33333334 159 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 160 | shadowmaskMode: 1 161 | blendWeights: 4 162 | textureQuality: 0 163 | anisotropicTextures: 1 164 | antiAliasing: 4 165 | softParticles: 1 166 | softVegetation: 1 167 | realtimeReflectionProbes: 1 168 | billboardsFaceCameraPosition: 1 169 | vSyncCount: 1 170 | lodBias: 2 171 | maximumLODLevel: 0 172 | particleRaycastBudget: 4096 173 | asyncUploadTimeSlice: 2 174 | asyncUploadBufferSize: 4 175 | resolutionScalingFixedDPIFactor: 1 176 | excludedTargetPlatforms: [] 177 | m_PerPlatformDefaultQuality: 178 | Android: 2 179 | Nintendo 3DS: 5 180 | Nintendo Switch: 5 181 | PS4: 5 182 | PSP2: 2 183 | Standalone: 5 184 | Tizen: 2 185 | WebGL: 3 186 | WiiU: 5 187 | Windows Store Apps: 5 188 | XboxOne: 5 189 | iPhone: 2 190 | tvOS: 2 191 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - PostProcessing 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.1 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | m_TestInitMode: 0 11 | CrashReportingSettings: 12 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 13 | m_NativeEventUrl: https://perf-events.cloud.unity3d.com/symbolicate 14 | m_Enabled: 0 15 | m_CaptureEditorExceptions: 1 16 | UnityPurchasingSettings: 17 | m_Enabled: 0 18 | m_TestMode: 0 19 | UnityAnalyticsSettings: 20 | m_Enabled: 1 21 | m_InitializeOnStartup: 1 22 | m_TestMode: 0 23 | m_TestEventUrl: 24 | m_TestConfigUrl: 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SimpleTimeLineWindow 2 | Ready to Make Simple Unity's TimeLine Style Extension tools 3 | 4 | 5 | > Simple Example 6 | Open Unity3d Menu 7 | Window->ExampleTimeLineWindow 8 | 9 | ![32f7adb73795236505c5a723ddbc4b9](https://user-images.githubusercontent.com/14041295/109672091-a274f800-7baf-11eb-8157-f31488f598ef.png) 10 | 11 | > Complex Example(Not Included) 12 | 13 | ![1e602d4376615ffd47b17787a06703d](https://user-images.githubusercontent.com/14041295/109672102-a6087f00-7baf-11eb-8f03-a0cd5f06795f.png) 14 | 15 | 16 | ``` 17 | public class ExampleTimeLine : SimpleTimeArea 18 | { 19 | // Create Your own Time line style tools 20 | } 21 | ``` 22 | --------------------------------------------------------------------------------