Skip to content

Commit

Permalink
v1.0 release prep
Browse files Browse the repository at this point in the history
- Added sync type attribute to all behaviours
- Added missing documentation buttons
- Bumped the version to 1.0.0
- Added a GetLayerNames utility to UTUtils
- Updated readme
- Updated the startup window with more up-to-date info
  • Loading branch information
orels1 committed Jul 12, 2021
1 parent 34c6f9a commit cefa7b8
Show file tree
Hide file tree
Showing 42 changed files with 126 additions and 86 deletions.
3 changes: 2 additions & 1 deletion Behaviours/Misc/AreaTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ namespace UdonToolkit {
[OnBeforeEditor("CheckCollisionTab")]
[CustomName("Area Trigger")]
[HelpMessage("It is recommended to put Area Triggers on a MirrorReflection layer unless they need a custom layer.")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#area-trigger")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#area-trigger")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class AreaTrigger : UdonSharpBehaviour {
[SectionHeader("General")]
[HelpBox("This behaviour requires a trigger collider to be attached to the object", "CheckCollider")]
Expand Down
3 changes: 2 additions & 1 deletion Behaviours/Misc/FogAdjustment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

namespace UdonToolkit {
[CustomName("Fog Adjustment")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#fog-adjustment")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#fog-adjustment")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class FogAdjustment : UdonSharpBehaviour {
public bool isLinearFog;
[SectionHeader("Default State")]
Expand Down
3 changes: 2 additions & 1 deletion Behaviours/Misc/InteractTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

namespace UdonToolkit {
[CustomName("Interact Trigger")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#interact-trigger")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#interact-trigger")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class InteractTrigger : UdonSharpBehaviour {
[SectionHeader("General")]
public bool active = true;
Expand Down
3 changes: 2 additions & 1 deletion Behaviours/Misc/LerpedFollower.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ namespace UdonToolkit {
[CustomName("Lerped Follower")]
[HelpMessage("This component makes the Target Transform follow the Source Transform with linear interpolation. " +
"Use this to make an object smoothly follow your target.")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#lerped-follower")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#lerped-follower")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class LerpedFollower : UdonSharpBehaviour {
[SectionHeader("General")]
public Transform sourceTransform;
Expand Down
3 changes: 2 additions & 1 deletion Behaviours/Misc/NetworkedTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace UdonToolkit {
[CustomName("Networked Trigger")]
[HelpMessage(
"This component waits for a \"Trigger\" custom event, e.g. from a UI Button, and calls a network event on all the provided behaviours.")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#networked-trigger")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#networked-trigger")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class NetworkedTrigger : UdonSharpBehaviour {
[SectionHeader("General")]
public bool active = true;
Expand Down
3 changes: 2 additions & 1 deletion Behaviours/Misc/ObjectBoundaryTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ namespace UdonToolkit {
[HelpMessage("This component tracks if objects cross ALL or ANY of the boundaries specified, " +
"useful for checking if something is above / below a global threshold.\n" +
"This will fire once and disable itself, send an \"Enable\" event to this component to re-enable the check")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#object-boundary-trigger")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#object-boundary-trigger")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class ObjectBoundaryTrigger : UdonSharpBehaviour {
[SectionHeader("General")] public bool active = true;
public Transform target;
Expand Down
3 changes: 2 additions & 1 deletion Behaviours/Misc/PlatformTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

namespace UdonToolkit {
[CustomName("Platform Trigger")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#platform-trigger")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#platform-trigger")]
[HelpMessage(
"This behaviour will send specified events on the Start of the world based on the current user platform")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class PlatformTrigger : UdonSharpBehaviour {
public bool fireOnStart = true;
[ListView("Desktop Events")] public UdonSharpBehaviour[] desktopTargets;
Expand Down
2 changes: 2 additions & 0 deletions Behaviours/Misc/PlayerMovementModifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace UdonToolkit {
"SET: sets the parameter to the provided value\n" +
"ADD: adds the provided value to the current\n" +
"SUBTRACT: subtracts the provided value from the current")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#player-movement-modifier")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class PlayerMovementModifier : UdonSharpBehaviour {
[Horizontal("Jump Impulse", true)][Popup("method", "@changeTypes", true)]
public int jumpImpulseChangeType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: aec6968de4cc5fc41b31be8bf370496e, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 6e0aae98177babd4297419783bbf84e6, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 241ef64bc304fa94a96989e3168a1fea, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: cbb4372414db60b4e83a425b857d85c3, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: cf72920c785d73745adf2734772eefa4, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 9437408c1a88feb43aea53befb3a661a, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: a5290d6119bb1bb4187e9f76fa776ade, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 12d73c85e26cbda46b38fa9a407cb668, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 549cbe4e86196ca4290932ecc5fb613a, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 930356accd35a0745ab0858f4de2c9e1, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 197d70c779ce27347a845d9e4fff9cf7, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 6bd31be68492ceb46bf02ac004a5eb8c, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 956e8e1bca40c4e47b6e1c3a1ff82821, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 6646f2d290fcbea4c809949b8d7e6397, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 80401847d6ad3a64090c6a5cb19c6bce, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: affaeea8ca1fbe4458332d68ba30a170, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 8c692d0bc2d4c25458d365046b724c6f, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MonoBehaviour:
udonAssembly:
assemblyError:
sourceCsScript: {fileID: 11500000, guid: 9b77a9da1662317489aaf8d4ae5c07cf, type: 3}
behaviourSyncMode: 0
behaviourSyncMode: 1
behaviourIDHeapVarName: __refl_const_intnl_udonTypeID
compileErrors: []
hasInteractEvent: 0
Expand Down
2 changes: 2 additions & 0 deletions Behaviours/Misc/RespawnTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

namespace UdonToolkit {
[CustomName("Respawn Trigger")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#respawn-trigger")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class RespawnTrigger : UdonSharpBehaviour {
[SectionHeader("General")]
public bool active = true;
Expand Down
72 changes: 38 additions & 34 deletions Behaviours/Misc/SecretActions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,47 @@

namespace UdonToolkit {
[CustomName("Secret Actions")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#secret-actions")]
public class SecretActions : UdonSharpBehaviour {
[SectionHeader("General")]
public bool active = true;

[ListView("Actions List")]
public string[] playerNames;
[ListView("Actions List")]
public UdonSharpBehaviour[] targets;

[ListView("Actions List")][Popup("behaviour", "@targets")] public string[] events;

private VRCPlayerApi player;

private void Start() {
if (!active) return;
player = Networking.LocalPlayer;
if (player == null) {
active = false;
return;
}
FireEvents();
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#secret-actions")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class SecretActions : UdonSharpBehaviour {
[SectionHeader("General")]
public bool active = true;

[ListView("Actions List")]
public string[] playerNames;

[ListView("Actions List")]
public UdonSharpBehaviour[] targets;

[ListView("Actions List")] [Popup("behaviour", "@targets")]
public string[] events;

private VRCPlayerApi player;

private void Start() {
if (!active) return;
player = Networking.LocalPlayer;
if (player == null) {
active = false;
return;
}

private void FireEvents() {
for (int i = 0; i < playerNames.Length; i++) {
if (playerNames[i] != player.displayName) continue;
var uB = targets[i];
if (uB != null) {
uB.SendCustomEvent(events[i]);
}
FireEvents();
}

private void FireEvents() {
for (int i = 0; i < playerNames.Length; i++) {
if (playerNames[i] != player.displayName) continue;
var uB = targets[i];
if (uB != null) {
uB.SendCustomEvent(events[i]);
}
}

public void Trigger() {
if (!active) return;
FireEvents();
}
}

public void Trigger() {
if (!active) return;
FireEvents();
}
}
}
3 changes: 2 additions & 1 deletion Behaviours/Misc/ShaderFeeder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace UdonToolkit {
[CustomName("Shader Feeder")]
[HelpMessage(
"This is an advanced behaviour, its highly recommended to check out the docs by clicking the blue manual icon in the corner above. This behaviour might not play nicely with animations that touch materials")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#shader-feeder")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#shader-feeder")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class ShaderFeeder : UdonSharpBehaviour {
[SectionHeader("General")] public bool active = true;
public Shader source;
Expand Down
11 changes: 6 additions & 5 deletions Behaviours/Misc/SkyboxAdjustment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ namespace UdonToolkit {
[CustomName("Skybox Adjustment")]
[HelpMessage(
"This component expects a \"Trigger\" event to transition between current and active skybox material values. You can ")]
[HelpURL("https://ut.orels.sh/behaviours/misc-behaviours#skybox-adjustment")]
[HelpURL("https://ut.orels.sh/v/v1.x/behaviours/misc-behaviours#skybox-adjustment")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class SkyboxAdjustment : UdonSharpBehaviour {
[SectionHeader("Active State")] public Material activeSkybox;

Expand All @@ -30,7 +31,7 @@ public class SkyboxAdjustment : UdonSharpBehaviour {

[OnValueChanged("ToggleSelf")] [SectionHeader("Transition")]
public bool instantTransition = true;

[HelpBox("Transition time cannot be negative", "CheckValidTransition")]
public float transitionTime;

Expand Down Expand Up @@ -69,17 +70,17 @@ public void Trigger() {
eColorVals = activeColorValues;
eVectorNames = activeVector3Names;
eVectorVals = activeVector3Values;

sFloatVals = new float[eFloatVals.Length];
for (int i = 0; i < eFloatNames.Length; i++) {
sFloatVals[i] = activeSkybox.GetFloat(eFloatNames[i]);
}

sColorVals = new Color[eColorVals.Length];
for (int i = 0; i < eColorNames.Length; i++) {
sColorVals[i] = activeSkybox.GetColor(eColorNames[i]);
}

sVectorVals = new Vector3[eVectorVals.Length];
for (int i = 0; i < eVectorNames.Length; i++) {
sVectorVals[i] = activeSkybox.GetVector(eVectorNames[i]);
Expand Down
1 change: 1 addition & 0 deletions Behaviours/Misc/StartTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

[CustomName("Start Trigger")]
[HelpMessage("You can also send a \"Trigger\" event to this behaviour to fire all the triggers again")]
[UdonBehaviourSyncMode(BehaviourSyncMode.NoVariableSync)]
public class StartTrigger : UdonSharpBehaviour {
[SectionHeader("General")]
public bool active = true;
Expand Down
Loading

0 comments on commit cefa7b8

Please sign in to comment.