FAQ & Common Problems
The type or namespace name 'XRBaseController' could not be found
This error shows up when CurvedUI is trying to find the XR Interaction Toolkit package, but it is not present in your project. CurvedUI requires this package to function, if you enabled its UNITY_XR control method, or have imported the New Input System package from Unity registry.
You can find the XR Interaction Toolkit package in the Package Manager in Unity editor. In some Unity versions, you may need to enable “Enable Pre-release Packages” in Project Settings / Package Manager before it shows up.
A step-by-step guide on how to configure CurvedUI with the new input system package and Unity XR here: Setup for Unity XR SDK
Can't use both hands at the same time.
Under the hood, CurvedUI tricks Unity into thinking the VR controller is a mouse. We made this choice to make sure the asset is compatible with existing Unity UI elements and any UI code you may have already created in your project. However, this means that only one hand can be interacting with the Canvas at a given time.
To work around this, CurvedUI comes with a hand switcher script that automatically switches between left and right controller when the user presses the trigger button on one of them. This script is a part of the CurvedUILaserPointer prefab.
This mechanic is what the "Both" option in CurvedUISettings refers to. The switch is quick, seamless, and familiar to users - this is the pattern that SteamVR Home and Oculus Home use.
Some buttons do not work!
Make sure all your interactive elements are inside the Canvas’ rectangle. You can see it as a white outline when you select the canvas gameobject.
For performance purposes, CurvedUI creates a collider that only covers objects inside the canvas’ rectangle.
Elements are not curved if I instantiate them.
When you add graphic elements to the curved canvas during runtime you have to add a CurvedUIVertexEffect component to them manually. You can do it with the following line:
YourNewObject.AddComponent<CurvedUIVertexEffect>();
Make sure you add the component after you make the element a child of the canvas. You can also make the CurvedUISettings component scan all its children and add necessary components by calling its AddEffectToChildren() function once.
Button interactions are not accurate.
Please make sure your interactive elements (buttons, sliders, dropdowns) are on z = 0 in relation to the canvas. To save performance, CurvedUI uses only one collider for the entire canvas. It is created at runtime and catches interactions at z position 0.
Make sure the proper camera is used for finding the controller/canvas interactions. If you have multiple cameras on the scene, make sure only one is tagged Main Camera. CurvedUI will find it automatically. Alternatively, manually assign your Main Camera to the Input Camera field on the Canvas component.
Moving An Object To Another Canvas.
When you move any object to a different canvas by changing its parent, you may find that its shape is not updated. This is because, for performance reasons, CurvedUI assumes that objects will not be moved between canvases. You can fix this by running the following code on the object after the move.
Nothing happens when I change objects by code.
CurvedUI looks for changes in Graphic components to know when a canvas object should be recalculated. Image, Text, RawImage are all examples of Graphic components. If you create a custom Graphic component, CurvedUI may have problems in finding out when a property has been changed by code. A change would be visible in the inspector, but not in the actual canvas object. You can then force CurvedUI object to redraw by using the following line:
Call it every time you change a property by code and it will work flawlessly.
Enable button is stuck on “Please Wait”
Open Unity’s Build Settings window and press the Enable button again. Some older unity versions do not allow changes to custom defines until the Build Settings window has been created (opened) at least once after opening Unity Editor
The referenced script on this Behaviour is missing
If you see this message on any of gameobjects in CurvedUI demo scenes, it most likely means something went wrong with asset import.
To fix this, open the Asset Store tab in Unity, re-download CurvedUI and click Import again.
Last updated