private void DrawResourceSystem() { DrbComponent drb = (DrbComponent)target; BeginModule("Resource System"); PathPopup("Editor Path", m_EditorPath); if (GUILayout.Button("Open Folder")) { FolderUtil.OpenFolder(drb.GetPath(m_EditorPath.stringValue)); } PathPopup("Internal Path", m_InternalPath); if (GUILayout.Button("Open Folder")) { FolderUtil.OpenFolder(drb.GetPath(m_InternalPath.stringValue)); } PathPopup("ReadOnly Path", m_ReadOnlyPath); if (GUILayout.Button("Open Folder")) { FolderUtil.OpenFolder(drb.GetPath(m_ReadOnlyPath.stringValue)); } PathPopup("Persistent Path", m_PersistentPath); if (GUILayout.Button("Open Folder")) { FolderUtil.OpenFolder(drb.GetPath(m_PersistentPath.stringValue)); } m_ResourceLoaderComponent.objectReferenceValue = EditorGUILayout.ObjectField("Resource Loader Component", m_ResourceLoaderComponent.objectReferenceValue, typeof(Internal.Resource.ResourceLoaderComponent), true); TypePopup("Resource Holder", ref m_ResourceHolderTypeNamesIndex, m_ResourceHolderTypeNames, m_ResourceHolderTypeName); TypePopup("Resource Decoder", ref m_ResourceDecoderTypeNamesIndex, m_ResourceDecoderTypeNames, m_ResourceDecoderTypeName); TypePopup("Dependency Manifest", ref m_ResourceDependencyManifestTypeNamesIndex, m_ResourceDependencyManifestTypeNames, m_ResourceDependencyManifestTypeName); EndModule(); }
private void DrawBaseSetting() { DrbComponent drb = (DrbComponent)target; BeginModule("Base Settings"); m_FrameRate.intValue = EditorGUILayout.IntSlider("Frame Rate", m_FrameRate.intValue, 0, MAX_FRAME_RATE); drb.FrameRate = m_FrameRate.intValue; m_TimeScale.floatValue = EditorGUILayout.Slider("Time Scale", m_TimeScale.floatValue, 0f, MAX_TIME_SCALE); drb.TimeScale = m_TimeScale.floatValue; m_RunInBackground.boolValue = EditorGUILayout.Toggle("Run In Background", m_RunInBackground.boolValue); drb.RunInBackground = m_RunInBackground.boolValue; bool neverSleep = EditorGUILayout.Toggle("Screen Never Sleep", m_SleepTimeout.intValue == SleepTimeout.NeverSleep); int sleepTimeout; if (!neverSleep) { sleepTimeout = EditorGUILayout.IntField("Screen Sleep Timeout", m_SleepTimeout.intValue); if (sleepTimeout == SleepTimeout.NeverSleep) { sleepTimeout = DEFAULT_SLEEP_TIMEOUT; } } else { sleepTimeout = -1; } if (sleepTimeout != m_SleepTimeout.intValue) { drb.SleepTimeout = sleepTimeout; } m_SleepTimeout.intValue = sleepTimeout; EndModule(); }