Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CurvyEvent.cs -> HasListeners() throws exception in WebPlayer builds
#1
Code:
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:

http://docs.unity3d.com/Manual/SecuritySandbox.html

From the docs:
Code:
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?
Reply
#2
I'll find a solution for the next release.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation [HOTFIX] UWP Builds Jake 0 2,147 06-21-2017, 06:36 PM
Last Post: Jake
  Null reference exception in CurvyCamController syscrusher 4 7,202 04-19-2016, 01:27 PM
Last Post: syscrusher

Forum Jump: