-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Expose some avatar root APIs #34
Conversation
Runtime/RuntimeUtil.cs
Outdated
@@ -2,7 +2,11 @@ | |||
using System.Collections.Generic; | |||
using JetBrains.Annotations; | |||
using UnityEngine; | |||
using UnityEngine.SceneManagement; | |||
|
|||
#if VRC_SDK_VRCSDK3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay to add a version define like NDMF_VRCSDK3_AVATARS
for "com.vrchat.avatars" to asmdef? (naming follows lilToon)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be fine I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I think it's necessary - I don't think the defines auto-set by the VRCSDK are a stable API.
Discussions: #39 |
Looks like the CHANGELOG check has failed, please add an appropriate changelog entry and repush. |
83291e7
to
c059c66
Compare
Related Issue: #49
This PR exposes some utility APIs:
RuntimeUtil.IsAvatarRoot()
RuntimeUtil.FindAvatarInParents()
Also, avatar root determination is defined in a cross platform way:
VRCAvatarDescriptor
as avatar root (unchanged).Animator
as avatar root (proposed). Less reliable if some users prefer setup with nesting avatar descriptors upon transplanting outfits (as mentioned in MA's EasySetupOutfit), but we don't want to use platform specific components here.