-
Notifications
You must be signed in to change notification settings - Fork 33
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: preserve property Id from asset data #313
Conversation
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.
Nice work on this!
However, I would actually suggest putting the [Preserve] attribute on the whole class rather than just on the Id
property to make sure that everything gets preserved.
EG
using UnityEngine.Scripting;
namespace ReadyPlayerMe.AvatarCreator
{
[Preserve]
public interface IAssetData
{
public string Id { get; set; }
public AssetType AssetType { get; set; }
}
}
We could alternatively to make use of a linker file instead of using the preserve attribute. When using a link file you can preserve an entire namespace. EG something like this <linker>
<assembly fullname="Assembly-CSharp">
<namespace fullname="ReadyPlayerMe.AvatarCreator" preserve="all"/>
</assembly>
</linker> This would preserve every class that is a part of ReadyPlayerMe.AvatarCreator, this may be overkill but it might prevent weird issues where certain stripping settings will strip random parts of our SDK code. Overall as long as the preserve tag works it doesn't really matter which approach. We should in any case make sure QA does thorough testing of this with different stripping settings on different platforms to ensure it works. |
Yep, I will prefer it like this, but tried it, and did not work. |
As discussed in huddle, seems that this is also not working for us. |
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.
Thanks for doing that, weird that the other approach didn't work though.
All good though.
SRV-1333
Description
How to Test