Search Unity

Unity3D WebPlayer MethodAccessException for XslTransform

Discussion in 'Scripting' started by angelcaf, Jul 12, 2013.

  1. angelcaf

    angelcaf

    Joined:
    Apr 18, 2013
    Posts:
    7
    Hello,
    I am trying to run an XSLT transform in a WebPlayer Project and I get a MethodAccessException.
    Below you can see the code snippet I am trying to run and the log messages.
    Any suggestion on how to fix this problem?

    Code (csharp):
    1. // XMLDoc is previously read
    2. MemoryStream m = new MemoryStream();
    3. myXslTransformer.Transform(XMLDoc , null, m);
    And this is the log error message:

     
  2. martin-n-stauber

    martin-n-stauber

    Joined:
    Jul 13, 2013
    Posts:
    1
    It's been a while since I ran into this problem, but I remember it being some problem with Mono.NET (it was either some unresolved bug, or unsupported functionality)

    I never found a way around it. I believe the best thing to do is find an XSLT library that is compatible with Mono. I was lucky enough to be able to move the xslt magic to the server side of my application. Sorry I couldn't be more help.
     
  3. angelcaf

    angelcaf

    Joined:
    Apr 18, 2013
    Posts:
    7
    Hi Martin,
    Thanks for your reply!

    And how did you move to the server side? Were you still using the WebPlayer? Did you use sockets?