Exemple #1
0
        public static IIGameLight AsGameLight(this IIGameObject obj)
        {
            var type        = GetWrappersAssembly().GetType("Autodesk.Max.Wrappers.IGameLight");
            var constructor = type.GetConstructors()[0];

            return((IIGameLight)constructor.Invoke(new object[] { obj.GetNativeHandle(), false }));
        }
Exemple #2
0
        public static IIGameLight AsGameLight(this IIGameObject obj)
        {
            var type        = GetWrappersAssembly().GetType("Autodesk.Max.Wrappers.IGameLight");
            var constructor = type.GetConstructors()[0];

            // var pointerType = GetWrappersAssembly().GetType("IGameCamera");
            unsafe
            {
                var voidPtr = obj.GetNativeHandle().ToPointer();
                return((IIGameLight)constructor.Invoke(new object[] { obj.GetNativeHandle(), false }));
            }
        }