Example #1
0
        public static string CallMethodDelegate(IntPtr className, IntPtr classNamespace, uint obj, IntPtr name,
                                                IntPtr argv, int argc,
                                                out bool result)
        {
            string _className      = Marshal.PtrToStringAnsi(className);
            string _classNamespace = Marshal.PtrToStringAnsi(classNamespace);
            string _name           = Marshal.PtrToStringAnsi(name);

            SimObject objectBaseWrapper = Sim.FindObjectById <SimObject>(obj);

            string[] strings = { };
            if (argv != IntPtr.Zero)
            {
                strings = StringMarshal.IntPtrToAnsiStringArray(argv, argc);
            }
            string strRes = EngineCallbacks.CallScriptMethod(_className, _classNamespace, objectBaseWrapper, _name, strings,
                                                             out result);

            return(strRes);
        }