Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Releases: MerlinVR/UdonSharp

Fix calling ToString() and other System.Object methods

26 Mar 23:17
Compare
Choose a tag to compare
  • 2a7332c: Fix issue with calling System.Object methods on types that are only defined in Udon on System.Object. The issue reported was calling ToString() on an enum type. Reported by @synergiance

Add jagged array support

24 Mar 22:46
Compare
Choose a tag to compare
  • 37bd8c7: Add support for jagged arrays of Unity and User types
  • 094eb9b: Fix drawing of user type on public fields so that they don't all appear as UdonBehaviour
  • e3773f6: Fix implicit numeric conversion from sbyte to float, reported by AirGamer
  • 8eb0346: Add error message for attempting to assign to a user type in a field initializer since the incorrect value type will be assigned.
  • cf6d97d: Fix null reference exception on newly created programs

Add runtime exception listener

23 Mar 04:15
Compare
Choose a tag to compare
  • 43c1d59: Add exception tracing that finds the behavior script and line in that script responsible for runtime exceptions in the editor
  • 54d0697: Add the same exception handling for the VRChat client by watching the output logs for Udon exceptions. This requires you to enable the Listen for client exceptions option in the Udon Sharp project settings section and launch your game with the argument --enable-udon-debug-logging
  • 3203ad2: Add inline C# code in generated assembly to make the uasm a little more readable. The compiler now inserts the C# code that generated a section of assembly before the assembly. This can be togged in the settings menu.

Add array initializers and fix bug with public field references

22 Mar 01:09
Compare
Choose a tag to compare
  • adb3a57: Add support for array initializers
  • a471ca9: Fix public fields getting set to this for Transform, GameObject, and UdonBehaviour, reported by @orels1

Improvements to showing bugs and bug fixes

20 Mar 04:58
Compare
Choose a tag to compare
  • d72ce7b: Add switch statement support
  • a2c6c76: Add error messages to the asset inspector
  • d3dbc79: Improve compile times for compiling all scripts and now make all scripts compile by default to avoid the potential for weird behavior
  • d3dbc79: Add option to go back to the old behavior of only compiling the script that was modified
  • d3dbc79: Fix bug that only allowed the first syntax error to print from AST parsing
  • bd0a905: Fix a bug with using GetComponent<T>() with user types on gameobjects rather then Components, reported by @zander123p and @VowganDesign
  • f72479e: Make errors have a their [UdonSharp] tag highlighted in pink

QOL features and new script creation workflow

16 Mar 06:46
Compare
Choose a tag to compare

All changes from 1208725

  • Add settings menu
  • #5: Add configurable script template to the settings menu. This uses a TextAsset in the project as the source of the template code for newly created U# scripts. Put the string <TemplateClassName> where you want the class name to be inserted in the template.
  • More detailed error messages on failed compiles; now give file path and line number
  • Make variable names nicer in some places for error messages
  • Add a custom UdonSharpBehaviour editor that warns the user when they are using a U# script directly and gives them the option to automatically convert it to an UdonBehaviour with the script reference setup
  • Add Right click context menu U# script creation which creates a script and script asset
  • Add an error when no base behaviour for an UdonSharpBehaviour is specified and tell the user to inherit from UdonSharpBehaviour
  • Remove the [AddComponentMenu("")] from the default template since the inspector will now warn people when they use the normal script.

Runtime field editing in the inspector

13 Mar 01:20
Compare
Choose a tag to compare
  • 66c30de: Add runtime field editing to UdonBehaviours using a UdonSharpBehaviour. This does not support "Paste Component Values" or undo/redo during play mode at the moment. You will need to recompile your scripts once for this to work.
  • a04885b: Fix in place arithmetic operators that access struct values.
  • 66c30de: Use delayed int field for array resizes so that it waits to resize after the user as finished editing the size.
  • 66c30de: Add check for negative array size values in the inspector.

Add support for GetComponent(s)<T> on user types

11 Mar 23:36
Compare
Choose a tag to compare
  • 068cc49: Add support for using GetComponent<T>, GetComponents<T>, and the other variants to get user defined types. This has some additional overhead above GetComponent<T> on Unity types so I don't recommend that you use it in an update loop.
  • 068cc49: Add type information to all UdonSharpBehaviour types which for the moment only includes a type ID long used to uniquely identify a class, and the name of the class. These can be accessed via GetUdonTypeID() and GetUdonTypeName() on any UdonSharpBehaviour. The type ID will return 0 in the case that the UdonBehaviour has not had a chance to initialize because it hasn't been enabled. It will also return 0 on graph assets since they do not have an ID assigned.
  • a1f6844: Add support for editing LayerMask fields in the inspector
  • 73c42ab: Add functionality to TypeExposureTree to audit functions that can return a UnityEngine.Component
  • 068cc49: Add check for attempts to use the Awake event and throw an error telling the user to use Start instead.
  • 068cc49: Fix implicit boolean cast when using unary negation operator on types without an operator overload for it.
  • 068cc49: Add for loop scope to prevent collisions of variable declarations in for loop initializers.
  • e254c97: Fix assignment of fields and properties inside structs stored in an array, reported by AirGamer

Fix bug with object equality/inequality operators on UnityEngine.Object

06 Mar 08:19
Compare
Choose a tag to compare
  • 95aaa8e: Fix issue with null checks on UnityEngine.Object types since Unity provides overrides on the equality operator for these types that acts differently from the System.Object equality operator, relevant article. Reported by @Octuplex
  • 2c20e9f: Fix implicit boolean conversions on UnityEngine.Object types
  • dddf3f4: Handle implicit boolean conversions on conditionals

Bug fixes

04 Mar 19:58
Compare
Choose a tag to compare
  • 5b44b95: Fix accessing extern user fields that are array types, reported by AirGamer