Skip to content

v1.0.0 Standalone Unity Compatibility and OnBuildException

Choose a tag to compare

@LiveDimensions LiveDimensions released this 03 Aug 19:52
· 33 commits to main since this release
9a26dbb

VR RefAssist is now compatible with standalone Unity!

  • UdonSharp is no longer a requirement but still fully supported.
  • All functionality now also works on MonoBehaviours

OnBuildException

You can now throw an OnBuildException within a [RunOnBuild] method, this lets you show a dialog prompt with up to 3 different buttons and implement your own functionality on each button and special control on whether or not to cancel the build.

Example code for OnBuildException
[RunOnBuild]
private void ExceptionTest()
{
    var e = new OnBuildException("Spawn point detected outside of allowed area", true)
    {
        dialog = new OnBuildDialog("Spawn point outside of allowed area", "We can try to automatically fix this.",
            new DialogButton("Fix and Continue", false, () =>
            {
                //Fix the issue here C:
                
                //If properly fixed
                return Result.ContinueBuild;
                
                //If not fixed
                return Result.CancelBuild;
            }),
            new DialogButton("Cancel", true),
            new DialogButton("Open Documentation", true, () =>
            {
                Application.OpenURL("https://github.com/LiveDimensions/VRRefAssist");
                return Result.CancelBuild;
            }))
    };
    throw e;
}

Breaking Changes ⚠

If you have any custom Autoset attributes you will need to change your GetObjectsLogic from:

public override object[] GetObjectsLogic(UdonSharpBehaviour uSharpBehaviour, Type type)

to

public override object[] GetObjectsLogic(MonoBehaviour monoBehaviour, Type type)

This is because all field-automation is now completely running on MonoBehaviours and not UdonSharpBehaviours.

How to install

In your Unity project, go to Window > Package Manager then click the top left +, click on Add package from git URL and paste this link:

https://github.com/LiveDimensions/VRRefAssist.git?path=/Packages/com.livedimensions.vrrefassist

Or, download VRRefAssist_v1.0.0.unitypackage from the assets below.

Please report any issues or unexpected behaviors to me on discord LiveDimensions