-
Notifications
You must be signed in to change notification settings - Fork 31
Description
LTCGI_RuntimeAdapter class not found OR mismatch
According to the file <UNITY_PROJECT>/Library/PackageCache/at.pimaker.ltcgi@14b23485f4/Runtime/LTCGI_UdonAdapter.cs, there is already statement from line 16:
#if UDONSHARP
[UdonBehaviourSyncMode(BehaviourSyncMode.None)]
public class LTCGI_UdonAdapter : UdonSharpBehaviour
#else
// FIXME: This makes the filename mismatch the class name
// - I think Unity doesn't like that?
public class LTCGI_RuntimeAdapter : MonoBehaviour
#endif
Yes, Unity 2021.3.23f1 does not like that.
Screenshots
The UdonAdapter class indeed transformed into regular Runtime Adapter class. However, due to some nature of C# (perhaps?), the filename must match with its class name.
Therefore currently it only works (maybe?) for VRChat & perhaps not standalone nor any other VR games, since the file name of the adapters combined to or propagated for is LTCGI_UdonAdapter.cs, while the converted to regular class name is LTCGI_RuntimeAdapter : MonoBehaviour (different than filename).
Workaround
Possible workaround & patch?:
Separate those adapters to each respective filename
- Transplant. Copy whole Udon Adapter class into a new file
LTCGI_RuntimeAdapter.csnext by UdonAdapter file. - Scrub. scrub both these file so the Udon ones only activates if there is UdonSharp installed per
#if UDONSHARP. And the regular runtime ones only activates if there is no UdonSharp per#if !UDONSHARP. - This should make class query work since now the class names matches with their filename.
Or maybe, keep UdonAdapter name, while when Udon is not installed it acts as regular Runtime Adapter?


