Add VRChat and GitHub packages to Unity project
This commit is contained in:
1 parent
0334a52b21
commit
85538aaccc
3297 files changed
+847877
No files matched your search
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Experimental.UIElements;
|
||||
|
||||
namespace VRC.Udon.Editor.ProgramSources.UdonGraphProgram.UI
|
||||
{
|
||||
public class ByteField : TextInputFieldBase<byte>
|
||||
{
|
||||
public ByteField()
|
||||
: base(3, char.MinValue)
|
||||
{
|
||||
this.AddToClassList("UdonValueField");
|
||||
this.isDelayed = true;
|
||||
}
|
||||
|
||||
public override byte value
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.value;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.value = value;
|
||||
this.text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ExecuteDefaultAction(EventBase evt)
|
||||
{
|
||||
base.ExecuteDefaultAction(evt);
|
||||
|
||||
if (this.text.Length > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var byteValue = Convert.ToByte(this.text);
|
||||
this.value = byteValue;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogError(e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c66f97d5a5a38cb478fd4df11ece7be7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,41 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Experimental.UIElements;
|
||||
|
||||
namespace VRC.Udon.Editor.ProgramSources.UdonGraphProgram.UI
|
||||
{
|
||||
public class CharField : TextInputFieldBase<char>
|
||||
{
|
||||
public CharField()
|
||||
: base(1, char.MinValue)
|
||||
{
|
||||
this.AddToClassList("UdonValueField");
|
||||
}
|
||||
|
||||
public override char value
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.value;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.value = value;
|
||||
this.text = value.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void ExecuteDefaultAction(EventBase evt)
|
||||
{
|
||||
base.ExecuteDefaultAction(evt);
|
||||
|
||||
if (this.text.Length > 0)
|
||||
{
|
||||
this.value = this.text.ToCharArray()[0];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 602ffcf431b3e4f41a18bd868751439a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor.Experimental.UIElements;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Experimental.UIElements;
|
||||
using UIElements = UnityEditor.Experimental.UIElements;
|
||||
|
||||
namespace VRC.Udon.Editor.ProgramSources.UdonGraphProgram.UI
|
||||
{
|
||||
public class LayerMaskField : BaseField<LayerMask>
|
||||
{
|
||||
public LayerMaskField()
|
||||
{
|
||||
// Set up styling
|
||||
AddToClassList("UdonValueField");
|
||||
|
||||
// Create LayerMask Editor and listen for changes
|
||||
UIElements.LayerMaskField field = new UIElements.LayerMaskField();
|
||||
field.OnValueChanged(e =>
|
||||
{
|
||||
this.value = e.newValue;
|
||||
});
|
||||
|
||||
Add(field);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 42d9183d7c7ce67448d1e010456e36f9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor.Experimental.UIElements;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Experimental.UIElements;
|
||||
|
||||
namespace VRC.Udon.Editor.ProgramSources.UdonGraphProgram.UI
|
||||
{
|
||||
public class QuaternionField : BaseField<Quaternion>
|
||||
{
|
||||
public QuaternionField()
|
||||
{
|
||||
// Set up styling
|
||||
AddToClassList("UdonValueField");
|
||||
|
||||
// Create Vector4 Editor and listen for changes
|
||||
Vector4Field field = new Vector4Field();
|
||||
field.OnValueChanged(
|
||||
e =>
|
||||
value = new Quaternion(e.newValue.x, e.newValue.y, e.newValue.z, e.newValue.w)
|
||||
);
|
||||
Add(field);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c96407d2b7698c4c8a0476efa2c765d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
using UnityEngine.Experimental.UIElements;
|
||||
using VRC.SDKBase;
|
||||
|
||||
namespace VRC.Udon.Editor.ProgramSources.UdonGraphProgram.UI
|
||||
{
|
||||
public class VRCUrlField : TextInputFieldBase<VRCUrl>
|
||||
{
|
||||
public VRCUrlField()
|
||||
: base(-1, char.MinValue)
|
||||
{
|
||||
AddToClassList("UdonValueField");
|
||||
RegisterCallback<BlurEvent>(OnBlur);
|
||||
}
|
||||
|
||||
private void OnBlur(BlurEvent evt)
|
||||
{
|
||||
base.value = new VRCUrl(text);
|
||||
}
|
||||
|
||||
public override VRCUrl value
|
||||
{
|
||||
get => base.value;
|
||||
set
|
||||
{
|
||||
base.value = value;
|
||||
text = value?.Get() ?? string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
~VRCUrlField()
|
||||
{
|
||||
UnregisterCallback<BlurEvent>(OnBlur);
|
||||
}
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eeb751ae1c234a04291c5039626f3470
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in new issue
Block a user