Пример #1
0
        public unsafe Mesh() : base(UnityInternals.object_new(InternalClassPointerStore <Mesh> .NativeClassPtr))
        {
            IntPtr returnedException = default;

            UnityInternals.runtime_invoke(m_ctor, UnityInternals.ObjectBaseToPtrNotNull(this), (void **)0, ref returnedException);
            Il2CppException.RaiseExceptionIfNecessary(returnedException);
        }
Пример #2
0
        public unsafe Texture2D(int width, int height) : base(UnityInternals.object_new(InternalClassPointerStore <Texture2D> .NativeClassPtr))
        {
            void **args = stackalloc void *[2];

            args[0] = &width;
            args[1] = &height;
            IntPtr returnedException = default;

            UnityInternals.runtime_invoke(m_ctor, UnityInternals.ObjectBaseToPtrNotNull(this), args, ref returnedException);
            Il2CppException.RaiseExceptionIfNecessary(returnedException);
        }