forked from MerlinVR/UdonSharp
-
Notifications
You must be signed in to change notification settings - Fork 51
Frequently Asked Questions
Momo the Monster edited this page Mar 31, 2022
·
1 revision
- Does UdonSharp Support X feature?
- Are prefabs supported fully?
- Can I access the player camera?
- Can I have more than one UdonSharp Udon Behavior on a GameObject?
- I'm starting from scratch and need to use C# tutorials. What common aspects of C# don't work in UdonSharp?
If Udon supports it, then so does UdonSharp.
Check Class exposure tree
You can use prefabs with Udon and U#, but changes to serialized fields on those prefabs will not propagate to instances of the prefab correctly due to limitations in Unity.
No, you can not access the player's camera. You can, however, get the head position and rotation.
See VRCPlayerApi.GetTrackingData
Vector3 headPos = localPlayer.GetTrackingData(TrackingData.Head).position
Yes.
I'm starting from scratch and need to use C# tutorials. What common aspects of C# don't work in UdonSharp?
If you are learning UdonSharp and not familiar with C# already, you may run across some commonly used techniques that don't work in Udon and UdonSharp yet. These include, but are not limited to, the following:
- Enums not already defined by Unity
- Generic classes (
Class<T>
) and methods - Inheritance
- Interfaces
- Method overloads
- Properties
The UdonSharp readme lists additional specific C# features that do not work.