“[Preserve]” 属性をつけて解決… https://github.com/yutopp/VJson/blob/4db11d1a89fcaa61c8d4f26cf7d2c1f9c2794f18/Packages/net.yutopp.vjs on/Runtime/Attribute.cs#L20 • 自前定義…? • Unityに “UnityEngine.Scripting.PreserveAttribute” ない? ◦ PureC#のコード部分なので、UnityEngineへの参照を持ちたくない 「For 3rd party libraries that do not want to take on a dependency on UnityEngine.dll, it is also possible to define their own PreserveAttribute. The code stripper will respect that too, and it will consider any attribute with the exact name "PreserveAttribute" as a reason not to strip the thing it is applied on, regardless of the namespace or assembly of the attribute.」 https://docs.unity3d.com/2019.4/Documentation/ScriptReference/Scripting.PreserveAttribute.html “PreserveAttribute” という名前であ れば、どこに定義していても最適化を抑 制できるattributeとして扱われる (あ りがたいけれどなんだそれは…)