Skip to content

Changelog

CyanLaser edited this page May 6, 2023 · 4 revisions

This page is for changelogs for 0.4 versions. Future version changelogs will be listed on the release page

Before Updating!

v0.4.x (Unity Package)

When updating from v0.3 to v0.4, Delete the CyanTrigger folder in your assets before importing! This includes:

  • Assets/CyanTrigger
  • Assets/CyanTriggerExamples

v0.4.x (VCC)

When updating from a Unity Package install of CyanTrigger to the VCC compatible version of CyanTrigger, Delete the following folders from your project before importing the package. VCC is intended to handle this automatically, but as of VCC version 1.0.1, it is currently broken and must be done manually.

  • v0.3

    • Assets/CyanTrigger
    • Assets/CyanTriggerExamples
  • v0.4 (If you never edited CyanTrigger settings or favorites, the entire Assets/CyanTrigger folder can be safely removed)

    • Assets/CyanTrigger/DefaultCustomActions
    • Assets/CyanTrigger/Editor
    • Assets/CyanTrigger/Examples
    • Assets/CyanTrigger/Resources
    • Assets/CyanTrigger/Runtime
    • Assets/CyanTrigger/CyanTriggerLicense.txt
    • Assets/CyanTrigger/package.json

Note that Examples and Default Custom Actions can be found under Assets/Samples/CyanTrigger/0.4.2/

When using Source Control, be sure to exclude the CyanTrigger Package

Changelog

v0.4.2

  • Fixed bug causing compile to fail if Auto Set Sync Mode was disabled

v0.4.1

  • Inspector
    • Added option to name CyanTrigger programs. These do not need to be unique
    • Added button at top of inspector to edit CyanTrigger comment
    • Added editors for types, allowing you to create them in the inspector: Char, SByte, UInt, UShort, ULong, Vector2Int, Vector3Int, Matrix4x4, Bounds, Rect, Ray, Plane
    • Using SendCustomEvent on a built in event will now show that event's parameters
      • Ex: OnPlayerTriggerEnter now has the player as a parameter
    • Fixed the Debug "Execute" buttons in playmode to just execute actions. These can still error if the actions use event parameters.
    • Variables with the same name will now display a number in brackets [] in variable selection lists to allow selecting any rather than just the first defined
    • Custom Actions display its description in the inspector.
      • All Default Custom Actions now have descriptions.
    • CyanTrigger footer is now 2 lines instead of 4
    • UdonBehaviour for CyanTrigger programs now has minimal information
    • Fixed CyanTrigger gizmo lines drawing to objects in prefabs not in the scene
    • Fixed some types not having a unique name. Ex nested enums
    • Fixed local variables allowing invalid characters in the names.
    • Fixed some inspector bugs that cause visual problems or render errors
  • New Actions and Custom Actions
    • Added UdonBehaviour.IsCyanTrigger to check if an udon program is a CyanTrigger
    • Added UdonBehaviour.GetCyanTriggerProgramName to get program name for CyanTrigger. This will be null if not a CyanTrigger.
    • Added CustomActions for GetCyanTriggerComponent, with variants for multiple, get in children, and get in parents, and option based on program name.
    • Added CustomActions for setting CyanTrigger programs enabled or toggle similar to GameObject.SetComponentActive. Has option for program name or all CyanTrigger
    • Added EnumToInt action to get int versions of any enum. Note there is no way to convert back from int to enum
    • Added CustomAction fixes for Mathf.SmoothDamp and Vector3.SmoothDamp
  • Custom Actions
    • Added Utility button to CyanTrigger Editable Programs to auto create a custom action for that program with all events exposed, making it easier to create custom actions.
    • Custom Action editor now shows the variables in the list to help distinguish between actions with the same name but different inputs
  • Compilation
    • Fixed InstanceOwner gate always working even for non instance owners due to VRChat bug
    • Fixed errors when creating a VERY large program (more than 512 variables or externs)
    • Fixed errors trying to call SendCustomEvent to a built in Udon event before that event was processed.
    • Throw compile error if SendCustomEvent to local method has wrong parameter names
  • Updated all example scenes
    • Fixed missing reflection probe bake (auto bake lighting enabled)
    • Combat training dummy now has sprite in health bar and uses Image.set fillAmount instead of modifying the transform.
    • Updated Player Raycast Teleport to get the point vector in each path, and only set the object's transform once outside the if/else
    • Updated player voice examples to disable collider first to ensure late joining works.
    • Updated PlayerAudio example program to now work closer to SDK2's audio override
      • Global saves values, OnTriggerExit will set back to global or default if no global
    • Copied SyncedUI into the SyncExamples scene since it relates to sync
    • Updated Spawn Object and Object Pool examples to no longer have logic on the trashcans, but destroy/return logic is on the objects themselves.
    • Added CyanTrigger on the ObjectPool example to auto set the object pool variable for all pooled objects.
  • Other changes
    • Internal changes to better support the SDK2 Migrator
    • Properly apply certain changes to prefabs
    • Recompile CyanTriggerPrograms on import or in scene verify to ensure always valid
    • Fixed UdonBehaviour with CyanTrigger Program but no CyanTriggerAsset component not showing public variable editor
    • Fixed CyanTriggerAsset inspector resetting variables if program does not match program on UdonBehaviour
    • Fixed adding CyanTriggerAsset from UdonBehaviour not copying public variable data

CyanTrigger Icon

CyanTrigger now has an icon! Every CyanTrigger component will have this icon and it will show every CyanTrigger in the scene. Clicking on the icon will select that object.


Icon in scene

You can hide the icon in the Gizmos section
Icon gizmo toggle

Color Themes

The CyanTrigger interface now has color to help distinguish items.
CyanTrigger in color example

All color options can be changed in the settings. Light and Dark themes can be configured separately. Colors can be exported and imported so people can share their themes. If you don’t like the color, you can also disable it to go back to the previous look.
Color Theme Settings

Event Replay

CyanTrigger now has an option for replaying events for late joiners. This is my replacement for a simple method of syncing similar SDK2’s Buffered Triggers. Note that while similar, these are NOT the same and will act differently. A video tutorial on this will be released along with V0.4. You can also read the documentation now to get the general idea. There are 3 Replay Types: Replay Once, Replay Parity, and Replay All. Along with these options, there is a new Action called Clear Replay which allows you to clear replay data for an event.
Event Replay Example

Option Selectors

Some actions now have dropdown selectors allowing you to pick specific items instead of manually typing it out and potentially making a mistake.
Option selector example

  • UdonBehaviour.SendCustomEvent
  • UdonBehaviour.SendCustomEventDelayedFrames
  • UdonBehaviour.SendCustomEventDelayedSeconds
  • UdonBehaviour.SendCustomNetworkEvent
  • UdonBehaviour.SetProgramVariable
  • UdonBehaviour.GetProgramVariable
  • UdonBehaviour.GetProgramVariableType
  • All Animator.Set Parameter actions and Custom Actions
  • GameObject.SetComponentActive

Custom Event Parameters

You can now define parameters on Custom Events, making it easier to pass data around between CyanTrigger events, including different CyanTriggers. When using UdonBehaviour.SendCustomEvent, events with parameters will show and provide editors for each parameter. You can only use parameters with local events that do not have a delay. Note that this only supports CyanTrigger and not UdonSharp methods.
Event Parameters
Event Parameters use

CyanTrigger In Playmode

You can now view CyanTrigger in playmode! Along with viewing all events, actions, and inputs, the variable editors will edit the current values for the UdonBehaviour. You can also execute specific events by clicking the buttons above the event.
CyanTrigger in playmode example

Documentation Buttons

The CyanTrigger interface now has many buttons to let you bring up the documentation for a part of the interface. All buttons for the interface will take you to the CyanTrigger Wiki. If you hover over Actions, Events, and Variables the documentation button will also appear here so you can read the Unity or C# documentation on that Action, Event, or Variable Type.
Documentation labels

CyanTrigger Program Asset

You can now create CyanTrigger Program Assets similar to UdonGraph and UdonSharp. These assets contain all the logic for a CyanTrigger, can be edited at any time outside the scene, and can be reused on multiple objects or even the same object. Since it is a file in the Assets folder, it can be exported and shared between projects. CyanTrigger components and Program Assets can easily be converted between each other, so you aren’t locked into just one. You can read more information on the documentation.
Create CyanTriggerProgram

Along with the new Program Asset, there is a new Component called “CyanTriggerAsset” which is the intended way to use a Program Asset in a scene or prefab. This new component lets you edit the program asset in the scene inspector, saves variables, supports multi object editing, and properly saves prefab and nested prefab changes!
CyanTriggerAsset component
CyanTriggerProgram

Custom Actions


CustomAction Icon

Custom Actions are CyanTrigger’s implementation of “Sub Programs”. These have existed since the first version of CyanTrigger, but had many limitations… But not any more! All known bugs have been fixed and multiple new features have been added, expanding the power of Custom Actions. With the Custom Actions framework, you can define your own Actions, Events, and even custom variable types. Custom Actions can be as simple as a shortcut to writing a few actions you use often, to as complex as full custom programs that are automatically added to a CyanTrigger that references it. Be sure to check out the documentation to learn more about them and how to create them.

Here are some of the features with Custom Actions:

  • Define your own Events, Actions and Variable Types using CyanTrigger, UdonGraph, or UdonSharp!
  • Supports Auto-Adding Events and Actions
  • Supports networked events, delayed events, synced variables, and variable changed events
  • Supports “Instances” allowing you to use Custom Actions with different data on the same CyanTrigger

When using Custom Actions in a CyanTrigger, there are more indicators letting you know something is a Custom Action. Custom Actions will now have an asterisk* after the name, display with a different color in the Action List, and when expanded, will show the program and definition allowing you to click into it to see what it is doing. When you hover over a Custom Action, instead of a documentation button, you will see an icon you can click to also go to the program that defines it.
CustomAction example

CyanTrigger Settings

CyanTrigger Settings have been moved into the Project Settings window. Along with the new location, you will see it separated out. At the top level, you can change settings, and under that you can select and change individual Variable, Action, and Event favorite lists. There is now a button at the bottom of every CyanTrigger that can open the settings window. Here are the settings options:

  • Actions section
    • Compile All Scene CyanTrigger
    • Compile All CyanTrigger Assets
    • Clear Serialized Data
  • Settings for when items should compile
    • Scene CyanTrigger: On Save, On Play, On Build
    • Asset CyanTrigger: On Build, On Edit, On Close
  • UI Settings
    • Show Action Inputs
    • Use Color Theme
    • Editors for Dark and Light theme


Settings preview

Event Warnings

Some Events in Udon seem to act global even when the CyanTrigger broadcast is set to local. For these actions, a warning will appear to let you know that something may be strange, and suggest using one of the available Custom Actions to help limit it. These warnings will show in the inspector and log during compile time, to help warn about CyanTrigger created from before v0.4. If an Event is intended, the warnings can also be ignored for that CyanTrigger.
Event warning example

Auto Determine Sync Mode

Figuring out Sync in Udon is difficult and can be confusing for new users. With this new setting, CyanTrigger will try to auto figure out the “Sync Mode” for you. It can also be disabled so you can set a specific Sync Mode. With this, Sync Mode None is now supported with CyanTrigger.
Auto syncmode example

In-Line Output Variables

In the previous version, when an action modified a value, the variable had to be defined in another action before an action used it. With V0.4, you can define a new variable on that action directly. This almost removes the need for a dedicated action to create local variables and will cut out a large number of actions for more complicated logic.
In-Line variable example

Variable Groups and Comments

The Variables section now supports groups and comments, helping you organize your variables. If working with CyanTrigger Program Assets, variables can also be hidden to not distract from the main inputs.
Variable Groups and Comments Example

New Examples

More examples have been added and have been separated out in groups

  • General Examples
  • Player API Examples
  • Pickup Examples
  • UI Menu Examples
  • Variable Examples
  • Sync Examples
  • Combat Examples
  • AI Examples

You can find all under in your Assets folder under CyanTrigger/Examples/Scenes. Be sure to check out the prefabs too.

New Actions and Events

If you want to read about all the Actions and Events that are specific to CyanTrigger and not in general Udon, check out the documentation page.

OnTimer

SDK2’s OnTimer is back. You can easily create cancel-able delays again.
OnTimer Example

GameObject.SetComponentActiveToggle

GameObject.SetComponentActive already existed, but the toggle version was missing. Not anymore. Now you can toggle components more easily. This action also supports dropdowns to select the component without typing it manually.
SetComponentActiveToggle Example

ForEach

The For action already existed as a way to easily loop between two values. With ForEach, you can now easily go through each element in an array, saving a few actions to find the length and get the object from the array.
ForEach example

New Custom Actions

Multiple Custom Actions have been added to help in creating logic. Since they use Custom Actions, it means you can look at how they were created, if you wanted to learn or make something similar.

UdonBehaviour.RandomEvent

One major lacking item in CyanTrigger compared to SDK2 was that randomizing events was very tedious. It took over 14 actions just to pick between 3 events. That’s not usable at all. With the UdonBehaviour.RandomEvent Custom Action, it’s all in one to easily randomize between any number of events!
Random Event Example

OnKey Events

Another event from SDK2 that was missing in CyanTrigger was OnKeyDown and OnKeyUp. While it was only about 4 actions, these have now been simplified into one Custom Action selectable in the Event List. You can now easily check for keys on your keyboard again.
OnKey Example

DataCache

DataCache is a new collection of Custom Actions to help reduce the need for finding specific objects and getting/setting values on them. These actions allow you to set a key value pair, and then get the value on ANY other CyanTrigger using that key. There are multiple supported types for DataCache, and since string is supported, you can also expand it to make your own. DataCache is extremely helpful when working with Udon Singletons and prefabs. If you have a prefab that you don’t want to manually link up a GameObject or UdonBehaviour, you can use DataCache to set it once, and have everything just get it. The prefab now becomes drag and drop! An example of this is used in the new FadeController prefab with the associated Custom Actions. DataCache uses VRCPlayerApi tags behind the scenes.
DataCache Example

ArrayLists

Udon does not currently support the List type, which are auto growing arrays. With Custom Actions and the new Custom Action Instances, you can create your own lists or use ArrayList instead to auto handle your array size. Pairing UdonArrayLists with UdonDataCache is an easy way to have one object keep track of many others for sending events.
ArrayList Example

Other Actions and Events

There are too many actions to fully describe, so here is a list.

  • Transform.Respawn
    • Save the initial position and allow you to respawn it at any time.
  • Intended for unsynced objects
  • Transform.GetLocalPositionAndRotation
  • Transform.SetLocalPositionAndRotation
  • Transform.GetPositionAndRotation
  • VRCPlayerApi.TeleportToSeamless
    • Teleport relative to an object. Can be used to hide that the player was even teleported
  • VRCPlayerApi.TeleportToRandomArea
    • Teleport to a random point within an area so all players don’t end up on top of each other.
  • VRCPlayerApi.GetPositionAndRotation
  • VRCPlayerApi.GetTrackingPositionAndRotation
  • VRCPlayerApi.GetBonePositionAndRotation
  • OnPlayerCollision Enter, Stay, Exit with Local and Remote options
  • InputUse, InputGrab, InputDrop, InputJump with Value and ValueHand options
    • Checking for each input type what the value is (up or down) and on what hand.

Important Change - CyanTrigger.SendCustomEvent removed

The action CyanTrigger.SendCustomEvent has been removed, and will automatically be replaced with UdonBehaviour.SendCustomEvent. From now on, use this new SendCustomEvent instead, as it works for all Udon types and is not limited to just CyanTrigger.

Important Change - Before Importing

Since this is a major update, in order to upgrade from a previous version of CyanTrigger, you need to delete the old CyanTrigger files first before importing. This includes the CyanTrigger examples folder. Any scripts that referenced CyanTrigger will also break and need to be manually updated. This means that the SDK2 Migrator does not support this version. An update will be published later to resolve this.

##Other Changes

  • Significant optimizations to CyanTrigger initialization
    • 6 to 10 seconds removed on every enter playmode and assembly reload.
  • General improvements to CyanTrigger Editor performance
  • Support for Disabled Domain Reloading to enter playmode instantly
    • Must use ClientSim as CyanEmu does not support this.
  • All CyanTrigger files moved under one folder
    • Support for moving the install path without breaking things
  • Global Variable and Event names can now support foreign characters
  • Local Player variable will never be null
  • Assembly generation optimizations
    • CyanTrigger will only have the start event if it actually uses it
  • Fixed Variable duplicate name check to actually increment the number instead of always append 1.
  • Other Settings, Sync Settings, and Variable Settings will save toggled state in the UI
  • Event comments now render above the event and display when collapsed.
  • Added null variable option to get rid of orange box if you explicitly want null
  • Improved Drag and Drop when working with different nesting levels
  • Fixed a few bugs breaking the Inspector when moving, deleting, or undoing events
  • Fixed changing events not properly clearing out used event variables
  • Fixed undo when adding CyanTrigger to a GameObject
  • Fixed CyanTrigger with removed Udon on prefabs
  • Better prefab support for Variables, Events, and Action editors
  • Pressing enter + control, alt, or shift with an action selected will edit the comment on this action or finish editing the comment.
  • Condition bool, For index, ForEach index and value can now all take existing variables or create new.
    • This means If condition can now check a variable directly instead of needing to set the value.
  • Many other changes…