Skip to content

Releases: MerlinVR/UdonSharp

Fix error line offset

23 Feb 19:48
023fcf0
Compare
Choose a tag to compare
  • 0816941: Actually fix the error line offset correctly so you can click on errors and go to the line that caused the error
  • 88cfa34: Stop giving return values a unique symbol name to reduce wasted symbol definitions
  • 600320b: More strict checks on functions with 0 parameters

Support for GetComponent<T> variants on Unity component types

23 Feb 03:50
Compare
Choose a tag to compare

All changes from commit dae3ffd

  • Add support for GetComponent<T>(), GetComponents<T>(), GetComponentInChildren<T>(), etc. This does not yet support doing GetComponent<UdonBehaviour> or getting components of user defined types
  • Fix enum type propagation causing errors sometimes depending on how an enum is referenced
  • Completely fix error line numbers being offset by field initializer bodies

Fix enum handling for comparisons and casts

21 Feb 23:36
Compare
Choose a tag to compare
  • e8f6835: Add handling for bit shifting with lower precision types
  • db12274: Add support for correctly casting Enums to integer types. I'm not sure if it's possible to go the other direction from int to enum with what Udon currently exposes. Reported by @synergiance
  • 2244bfe: Add handling for comparing enums using Object.Equals internally since Udon does not yet expose comparison operators for enum types, reported by @synergiance

Fix array type parameters and bitshift special cases

21 Feb 18:05
Compare
Choose a tag to compare
  • 4335367: Fix issue with passing arrays as parameters to user defined methods, reported by @Foorack
  • 32e4104: Fix special case where some Udon functions for left shift and right shift operators take signed ints for shifting an unsigned type, reported by @Foorack

More bug fixes

21 Feb 03:39
Compare
Choose a tag to compare

All fixes from commit: e45da66

  • Fix namespaces when the { is on the same line as the namespace since a space was being included in the token, reported by @synergiance
  • Fix issues with arrays being null in the inspector, reported by @orels1 and @PhaxeNor
  • Make the array 0 initialization more conformant to Unity's behavior. Force public arrays to be 0 initialized as well.
  • Fix issue with check for extern user fields and methods that could sometimes cause a null reference exception, reported by @PhaxeNor

Fix handling for user namespaces

21 Feb 02:18
Compare
Choose a tag to compare

User behaviour linking

20 Feb 23:24
a0bee6a
Compare
Choose a tag to compare

This release has a bunch of fixes and allows you to access fields and methods on other UdonSharpBehaviours that you define. In order to use this, your behaviours must inherit from UdonSharpBehaviour. For instance this allows you to make a debug console in your world that uses a behaviour you have defined named DebugConsole that behaviour that has a method named Log(string logMessage) defined inside it. You can then store a reference to the DebugConsole on another behaviour and directly call it like debugConsoleRef.Log("Hello");

Features:

  • 0658ed8: Call methods on other behaviours directly
  • 17e36a2: Get and set fields on other behaviours directly
  • 17e36a2: Store references to other behaviours as references to the type the user defined.
  • a8e4ec9: Allow arrays of user-defined behaviour references
  • f7cde48 ec1f25c f87ea0f: Overridden UI to allow checking on component type and [HideInInspector] attribute. The UI uses unity-like naming on variables and has a more unity-like array editor. It also supports viewing and editing a wider range of builtin types.
  • afd0e8e: Add types that will be supported for syncing in an upcoming version of Udon to the sync type check whitelist
  • dfc003f: Add instantiate call to VRCInstantiate so that it can have its behaviour mirrored if you want to test without using Udon

Bug fixes

  • 0658ed8: Add type checking on typeof() so that users cannot get the type of a user defined type since it will only exist in the editor and will be null at runtime since VRC does not define the same type.
  • f7cde48: Now initialize array fields to a 0-length array like they usually are in Unity, reported by @synergiance
  • 45cb3b6: Fix infinite loop when using continue in foreach loops, reported by @orels1
  • 9bceab8 efdeb24: Switch UdonSharp to use assembly definition files and make the Roslyn compiler dlls editor-only and force them to be included explicitly. Hopefully this will resolve a rare bug where Unity decides that it can't compile anything and drops all asset references in your editor until you restart your editor.
  • ec1f25c: Fix issue with using [UdonSynced] without an attribute list, reported by @gg67
  • b238c44: Make all 'named' variables also unique based on their type. This was generating unnecessary garbage as the heap would need to create a new strongbox every time the type of the variable changed, reported by @TCL987

Fix issue with flattening function variables

15 Feb 08:13
Compare
Choose a tag to compare
  • 6ffbbda: Fix issue with flattening variables in function scopes that could cause issues when calling one function from another in some situations

Bug fixes and some more features

14 Feb 21:22
Compare
Choose a tag to compare
  • 1273789: @PhaxeNor added the U# program asset to the right click create asset menu
  • 0f9e9a4: Added a special case for iterating over every char in a string using a foreach loop
  • 5647e4b: Changes to how compiliation is handled. Added a Compile All UdonSharp Programs button to the program inspector
  • 60531dc: @Toocanzs improved debug error line offsets when using multi-line field initializers.
  • 5647e4b: Fix the compile progress bar sticking around if some file writing exception happens
  • 16e00aa: Fix casts for array types
  • 16e00aa: Fix property accesses on other UdonBehaviours

Bug fixes and better checking for invalid syntax

13 Feb 19:17
Compare
Choose a tag to compare
  • 417951d: Add VRC namespaces to template script for easier access to PlayerApi and other VRC-related stuff
  • 23bc695: Add more specific exceptions for when an operator cannot be found given two operand types
  • eca8bb7: Add checking for attempting to set a readonly property
  • 4c94137: Fix for handling constructors on structs with more than 0 parameters that aren't defined in Udon
  • 4c94137: Add type validation to make sure Udon defines a type before the user can define a variable of that type. This prevents the assembly from silently failing to assemble when the user defines an unsupported variable type.