Add VRChat and GitHub packages to Unity project

This commit is contained in:
gunnbr committed 2021-01-18 09:14:18 -08:00
1 parent 0334a52b21
commit 85538aaccc
3297 files changed
+847877

No files matched your search

@@ -0,0 +1,59 @@
/*
#if VRC_SDK_VRCSDK3
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using System;
[CustomEditor(typeof(VRC.SDK3.Components.VRCDestructibleUdon))]
public class VRCDestructibleUdonEditor : Editor
{
VRC.SDK3.Components.VRCDestructibleUdon myTarget;
void OnEnable()
{
if (myTarget == null)
myTarget = (VRC.SDK3.Components.VRCDestructibleUdon)target;
}
string[] UdonMethods = null;
string[] UdonVariables = null;
public override void OnInspectorGUI()
{
var udon = myTarget.GetComponent<VRC.Udon.UdonBehaviour>();
if (udon != null)
{
#if VRC_CLIENT
myTarget.UdonMethodApplyDamage = EditorGUILayout.TextField("On Apply Damage", myTarget.UdonMethodApplyDamage);
myTarget.UdonMethodApplyHealing= EditorGUILayout.TextField("On Apply Healing", myTarget.UdonMethodApplyHealing);
myTarget.UdonVariableCurrentHealth= EditorGUILayout.TextField("Current Health Variable", myTarget.UdonVariableCurrentHealth);
myTarget.UdonVariableMaxHealth = EditorGUILayout.TextField("On Max Health Variable", myTarget.UdonVariableMaxHealth);
#else
List<string> methods = new List<string>(udon.GetPrograms());
methods.Insert(0, "-none-");
myTarget.UdonMethodApplyDamage = DrawUdonProgramPicker("On Apply Damage", myTarget.UdonMethodApplyDamage, methods);
myTarget.UdonMethodApplyHealing = DrawUdonProgramPicker("On Apply Healing", myTarget.UdonMethodApplyHealing, methods);
List<string> variables = new List<string>(udon.publicVariables.VariableSymbols);
variables.Insert(0, "-none-");
myTarget.UdonVariableCurrentHealth = DrawUdonProgramPicker("Current Health Variable", myTarget.UdonVariableCurrentHealth, variables);
myTarget.UdonVariableMaxHealth = DrawUdonProgramPicker("Max Health Variable", myTarget.UdonVariableMaxHealth, variables);
#endif
}
}
string DrawUdonProgramPicker(string title, string current, List<string> choices)
{
int index = choices.IndexOf(current);
if (index == -1)
index = 0;
int value = EditorGUILayout.Popup(title, index, choices.ToArray());
if (value != 0)
return choices[value];
return current;
}
}
#endif
*/
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d57b23c04034119448f23c5fdbc57662
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,33 @@
#if VRC_SDK_VRCSDK3
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using System;
[CustomEditor(typeof(VRC.SDK3.Components.VRCStation))]
public class VRCPlayerStationEditor3 : Editor
{
VRC.SDK3.Components.VRCStation myTarget;
void OnEnable()
{
if(myTarget == null)
myTarget = (VRC.SDK3.Components.VRCStation)target;
}
public override void OnInspectorGUI()
{
myTarget.PlayerMobility = (VRC.SDKBase.VRCStation.Mobility)EditorGUILayout.EnumPopup("Player Mobility", myTarget.PlayerMobility);
myTarget.canUseStationFromStation = EditorGUILayout.Toggle("Can Use Station From Station", myTarget.canUseStationFromStation);
myTarget.animatorController = (RuntimeAnimatorController) EditorGUILayout.ObjectField("Animator Controller", myTarget.animatorController, typeof(RuntimeAnimatorController), false );
myTarget.disableStationExit = EditorGUILayout.Toggle("Disable Station Exit", myTarget.disableStationExit );
myTarget.seated = EditorGUILayout.Toggle("Seated", myTarget.seated);
myTarget.stationEnterPlayerLocation = (Transform)EditorGUILayout.ObjectField("Player Enter Location", myTarget.stationEnterPlayerLocation, typeof(Transform), true);
myTarget.stationExitPlayerLocation = (Transform)EditorGUILayout.ObjectField("Player Exit Location", myTarget.stationExitPlayerLocation, typeof(Transform), true);
myTarget.controlsObject = (VRC.SDKBase.VRC_ObjectApi)EditorGUILayout.ObjectField("API Object", myTarget.controlsObject, typeof(VRC.SDKBase.VRC_ObjectApi), false);
}
}
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8901d07a685ca424492a3cabff506184
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,27 @@
#if VRC_SDK_VRCSDK3
using UnityEditor;
[CustomEditor (typeof(VRC.SDK3.Components.VRCSceneDescriptor))]
public class VRCSceneDescriptorEditor3 : Editor
{
VRC.SDK3.Components.VRCSceneDescriptor sceneDescriptor;
VRC.Core.PipelineManager pipelineManager;
public override void OnInspectorGUI()
{
if(sceneDescriptor == null)
sceneDescriptor = (VRC.SDK3.Components.VRCSceneDescriptor)target;
if(pipelineManager == null)
{
pipelineManager = sceneDescriptor.GetComponent<VRC.Core.PipelineManager>();
if(pipelineManager == null)
sceneDescriptor.gameObject.AddComponent<VRC.Core.PipelineManager>();
}
DrawDefaultInspector();
}
}
#endif
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 4b2b9ac625bc5b04c887ff9ee9b5fdbe
timeCreated: 1450463561
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,73 @@
#if VRC_SDK_VRCSDK3
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
namespace VRCSDK2
{
[CustomEditor(typeof(VRC.SDK3.Components.VRCPickup))]
public class VRC_PickupEditor3 : Editor
{
private void InspectorField(string propertyName, string humanName)
{
SerializedProperty propertyField = serializedObject.FindProperty(propertyName);
EditorGUILayout.PropertyField(propertyField, new GUIContent(humanName), true);
}
private SerializedProperty momentumTransferMethodProperty;
private SerializedProperty disallowTheftProperty;
private SerializedProperty exactGunProperty;
private SerializedProperty exactGripProperty;
private SerializedProperty allowManipulationWhenEquippedProperty;
private SerializedProperty orientationProperty;
private SerializedProperty autoHoldProperty;
private SerializedProperty interactionTextProperty;
private SerializedProperty useTextProperty;
private SerializedProperty throwVelocityBoostMinSpeedProperty;
private SerializedProperty throwVelocityBoostScaleProperty;
private SerializedProperty pickupableProperty;
private SerializedProperty proximityProperty;
public override void OnInspectorGUI()
{
momentumTransferMethodProperty = serializedObject.FindProperty("MomentumTransferMethod");
disallowTheftProperty = serializedObject.FindProperty("DisallowTheft");
exactGunProperty = serializedObject.FindProperty("ExactGun");
exactGripProperty = serializedObject.FindProperty("ExactGrip");
allowManipulationWhenEquippedProperty = serializedObject.FindProperty("allowManipulationWhenEquipped");
orientationProperty = serializedObject.FindProperty("orientation");
autoHoldProperty = serializedObject.FindProperty("AutoHold");
interactionTextProperty = serializedObject.FindProperty("InteractionText");
useTextProperty = serializedObject.FindProperty("UseText");
throwVelocityBoostMinSpeedProperty = serializedObject.FindProperty("ThrowVelocityBoostMinSpeed");
throwVelocityBoostScaleProperty = serializedObject.FindProperty("ThrowVelocityBoostScale");
pickupableProperty = serializedObject.FindProperty("pickupable");
proximityProperty = serializedObject.FindProperty("proximity");
EditorGUILayout.BeginVertical(GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 30));
EditorGUILayout.PropertyField(momentumTransferMethodProperty, new GUIContent("Momentum Transfer Method"));
EditorGUILayout.PropertyField(disallowTheftProperty, new GUIContent("Disallow Theft"));
EditorGUILayout.PropertyField(exactGunProperty, new GUIContent("Exact Gun"));
EditorGUILayout.PropertyField(exactGripProperty, new GUIContent("Exact Grip"));
EditorGUILayout.PropertyField(allowManipulationWhenEquippedProperty, new GUIContent("Allow Manipulation When Equipped"));
EditorGUILayout.PropertyField(orientationProperty, new GUIContent("Orientation"));
EditorGUILayout.PropertyField(autoHoldProperty, new GUIContent("AutoHold", "If the pickup is supposed to be aligned to the hand (i.e. orientation field is set to Gun or Grip), auto-detect means that it will be Equipped(not dropped when they release trigger), otherwise just hold as a normal pickup."));
EditorGUILayout.PropertyField(interactionTextProperty, new GUIContent("Interaction Text","Text displayed when user hovers over the pickup."));
if (autoHoldProperty.enumValueIndex != (int)VRC.SDK3.Components.VRCPickup.AutoHoldMode.No)
EditorGUILayout.PropertyField(useTextProperty, new GUIContent("Use Text", "Text to display describing action for clicking button, when this pickup is already being held."));
EditorGUILayout.PropertyField(throwVelocityBoostMinSpeedProperty, new GUIContent("Throw Velocity Boost Min Speed"));
EditorGUILayout.PropertyField(throwVelocityBoostScaleProperty, new GUIContent("Throw Velocity Boost Scale"));
EditorGUILayout.PropertyField(pickupableProperty, new GUIContent("Pickupable"));
EditorGUILayout.PropertyField(proximityProperty, new GUIContent("Proximity"));
EditorGUILayout.EndVertical();
serializedObject.ApplyModifiedProperties();
}
}
}
#endif
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a8cc4c1876b26174fbaeb062178a6bda
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,58 @@
#if VRC_SDK_VRCSDK3
#if UNITY_EDITOR
using UnityEngine;
using UnityEditor;
namespace VRC.SDK3.Editor
{
[CustomEditor(typeof(VRC.SDK3.Components.VRCSpatialAudioSource))]
public class VRC_SpatialAudioSourceEditor3 : UnityEditor.Editor
{
private bool showAdvancedOptions = false;
private SerializedProperty gainProperty;
private SerializedProperty nearProperty;
private SerializedProperty farProperty;
private SerializedProperty volRadiusProperty;
private SerializedProperty enableSpatialProperty;
private SerializedProperty useCurveProperty;
public override void OnInspectorGUI()
{
gainProperty = serializedObject.FindProperty("Gain");
nearProperty = serializedObject.FindProperty("Near");
farProperty = serializedObject.FindProperty("Far");
volRadiusProperty = serializedObject.FindProperty("VolumetricRadius");
enableSpatialProperty = serializedObject.FindProperty("EnableSpatialization");
useCurveProperty = serializedObject.FindProperty("UseAudioSourceVolumeCurve");
serializedObject.Update();
VRC.SDKBase.VRC_SpatialAudioSource target = serializedObject.targetObject as VRC.SDKBase.VRC_SpatialAudioSource;
AudioSource source = target.GetComponent<AudioSource>();
EditorGUILayout.BeginVertical();
EditorGUILayout.PropertyField(gainProperty, new GUIContent("Gain"));
EditorGUILayout.PropertyField(farProperty, new GUIContent("Far"));
showAdvancedOptions = EditorGUILayout.Foldout(showAdvancedOptions, "Advanced Options");
bool enableSp = enableSpatialProperty.boolValue;
if (showAdvancedOptions)
{
EditorGUILayout.PropertyField(nearProperty, new GUIContent("Near"));
EditorGUILayout.PropertyField(volRadiusProperty, new GUIContent("Volumetric Radius"));
EditorGUILayout.PropertyField(enableSpatialProperty, new GUIContent("Enable Spatialization"));
if (enableSp)
EditorGUILayout.PropertyField(useCurveProperty, new GUIContent("Use AudioSource Volume Curve"));
}
EditorGUILayout.EndVertical();
if (source != null)
source.spatialize = enableSp;
serializedObject.ApplyModifiedProperties();
}
}
}
#endif
#endif
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3f8f999a8e1ebee4588f94a8a618d7c6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: