Bring in AAC!
project ive been working on for a while, just felt confident enough to move it here
This commit is contained in:
parent
e608e2a56b
commit
1d7052a258
209 changed files with 1561 additions and 74738 deletions
50
AAC/AACCore/Runtime/AACRoot.cs
Normal file
50
AAC/AACCore/Runtime/AACRoot.cs
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using VRC.SDKBase;
|
||||
|
||||
namespace gay.lilyy.aaccore {
|
||||
/// <summary>
|
||||
/// Adding this to the avatar root will build the FX layer.
|
||||
/// </summary>
|
||||
public class AACRoot : MonoBehaviour, IEditorOnly {
|
||||
public bool experimentalPlayMode = true;
|
||||
public bool experimentalUpload = false;
|
||||
|
||||
// unity needs this to show the enable/disable box
|
||||
void Start(){}
|
||||
|
||||
#if UNITY_EDITOR
|
||||
[CustomEditor(typeof(AACRoot))]
|
||||
private class Editor : UnityEditor.Editor
|
||||
{
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
// Draw the default message
|
||||
EditorGUILayout.HelpBox(
|
||||
"Adding this to the avatar root will build the FX layer.",
|
||||
MessageType.Info
|
||||
);
|
||||
|
||||
// Draw the 'Enable Experimental Layers' toggle
|
||||
var component = (AACRoot)target;
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool newValPlay = EditorGUILayout.Toggle("Enable Experimental Layers in Play Mode", component.experimentalPlayMode);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(component, "Toggle Experimental Layers in Play Mode");
|
||||
component.experimentalPlayMode = newValPlay;
|
||||
EditorUtility.SetDirty(component);
|
||||
}
|
||||
EditorGUI.BeginChangeCheck();
|
||||
bool newValUpload = EditorGUILayout.Toggle("Enable Experimental Layers in Uploads", component.experimentalUpload);
|
||||
if (EditorGUI.EndChangeCheck())
|
||||
{
|
||||
Undo.RecordObject(component, "Toggle Experimental Layers in Uploads");
|
||||
component.experimentalPlayMode = newValUpload;
|
||||
EditorUtility.SetDirty(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue