Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CurvyEvent.cs -> HasListeners() throws exception in WebPlayer builds
FieldAccessException: Attempt to access a private/protected field failed.
 at (wrapper managed-to-native) System.Reflection.MonoField:GetValueInternal (object)
 at System.Reflection.MonoField.GetValue (System.Object obj) [0x00000] in <filename unknown>:0
 at FluffyUnderware.Curvy.UnityEventEx`1[T0].HasListeners () [0x00000] in <filename unknown>:0
 at FluffyUnderware.Curvy.Controllers.SplineController.BindEvents () [0x00000] in <filename unknown>:0
 at FluffyUnderware.Curvy.Controllers.SplineController.Prepare () [0x00000] in <filename unknown>:0

I'm trying to use the SplineController in a webplayer build but it uses reflection which is not allowed by the Webplayer's security sandbox:

From the docs:
Disallowing the usage of System.Reflection.* to call private/internal methods in classes you did not write yourself.

This is part of the security model is not emulated by the Editor so web builds must be created to test for it. I could modify the source to not use those checks (and default to calling the "eventaware" versions of the methods that used them) but I was wondering if you had maybe solved this problem in a different way?
I'll find a solution for the next release.

Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Argument Null exception Beqo77 5 17 04-24-2023, 08:26 PM
Last Post: _Aka_
  Curvy Generator Exception niek352 2 11 07-14-2022, 02:59 PM
Last Post: niek352
Bug No demos running without exception with IL2CPP with Curvy Spline 8 studentloan 10 15 04-22-2022, 08:52 PM
Last Post: _Aka_
Exclamation [HOTFIX] UWP Builds Jake 0 2,221 06-21-2017, 06:36 PM
Last Post: Jake

Forum Jump: