예제 #1
0
    public override void OnInspectorGUI()
    {
        AtmosManager atmosManager = (AtmosManager)target;

        GUIContent speedContent      = new GUIContent("Speed", "frequency of Atmos simulation updates (Millieseconds between each update)");
        GUIContent SubOperations     = new GUIContent("SubOperations", "The number of operations done in each update ( meant for sub millisecond adjustment )");
        GUIContent numThreadsContent =
            new GUIContent("Threads", "not currently implemented, thread count is always locked at one regardless of this setting");

        atmosManager.Mode = (AtmosMode)EditorGUILayout.EnumPopup("Mode", atmosManager.Mode);

        atmosManager.Speed = EditorGUILayout.Slider(speedContent, atmosManager.Speed, 0, 5000);

        GUI.enabled = atmosManager.Mode == AtmosMode.Threaded;

        atmosManager.NumberThreads = EditorGUILayout.IntSlider(numThreadsContent, atmosManager.NumberThreads, 1, 1);

        GUI.enabled = true;

        AddButtonGroup(atmosManager);

        EditorGUILayout.LabelField("Update List Count", AtmosThread.GetUpdateListCount().ToString());

        EditorUtility.SetDirty(atmosManager);
    }
예제 #2
0
    public override void OnInspectorGUI()
    {
        AtmosManager atmosManager = (AtmosManager)target;

        atmosManager.Speed         = EditorGUILayout.Slider("Speed", atmosManager.Speed, 0.01f, 1f);
        atmosManager.NumberThreads = EditorGUILayout.IntSlider("Threads", atmosManager.NumberThreads, 1, 1);

        EditorGUILayout.LabelField("Update List Count", AtmosThread.GetUpdateListCount().ToString());

        EditorUtility.SetDirty(atmosManager);
    }