passing Instance Class parameters inside Instance class functions

Aug 6, 2014 at 11:30 AM
Hello, Ive tried succesfully to apply instance class at 'Exposing a .NET class to JavaScript' using unity however the parameters passed into the methods are 'system'... Wether I try to use my own defined 'jurassic' classes (ClrFunction/ObjectInstance) or use the option of 'engine.EnableExposedClrTypes' that automagically enable to use the UnitySystem classes (somewhat) produces errors like:
NotImplementedException: Unsupported parameter type 'UnityEngine.Transform'.

engine.SetGlobalValue( "Transform", typeof(Transform) );

engine.SetGlobalValue( "Transformation", new jsTransformationConstructor(engine) );

public class jsTransformationConstructor : ClrFunction
{
public jsTransformationConstructor( ScriptEngine engine )
    : base(  engine.Function.InstancePrototype, "Transformation", new jsTransformationInstance( engine.Object.InstancePrototype )  )
{}

[JSConstructorFunction]
public jsTransformationInstance Construct( Transform transformObjec  )
{
    return new jsTransformationInstance( this.InstancePrototype, transformObject );
}

}

public class jsTransformationInstance : ObjectInstance
{
private Transform transformObject;

public jsTransformationInstance( ObjectInstance prototype )
    : base( prototype )
{
    this.PopulateFunctions();
}

public jsTransformationInstance( ObjectInstance prototype, Transform transform )
    : base( prototype )
{
    this.transformObject = transform;
}
}


Thanks in advance ! :D