Ejemplo n.º 1
0
            internal static unsafe bool Invoke(IntPtr obj, MaterialFunctionInterface NewMaterialFunction)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((IntPtr *)(b + 0)) = NewMaterialFunction;
                Main.GetProcessEvent(obj, SetMaterialFunction_ptr, new IntPtr(p));;
                return(*((bool *)(b + 8)));
            }
        }
Ejemplo n.º 2
0
            internal static unsafe void Invoke(MaterialFunctionInterface MaterialFunction, Material PreviewMaterial)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((IntPtr *)(b + 0)) = MaterialFunction;
                *((IntPtr *)(b + 8)) = PreviewMaterial;
                Main.GetProcessEvent(MaterialEditingLibrary.DefaultObject, UpdateMaterialFunction_ptr, new IntPtr(p));;
            }
        }
Ejemplo n.º 3
0
 ///<summary>Update a Material Function after edits have been made.</summary>
 ///<remarks>Will recompile any Materials that use the supplied Material Function.</remarks>
 public static void UpdateMaterialFunction(MaterialFunctionInterface MaterialFunction, Material PreviewMaterial) =>
 MaterialEditingLibrary_methods.UpdateMaterialFunction_method.Invoke(MaterialFunction, PreviewMaterial);