/// <summary>Change one of the materials on the shape.</summary> /// <description> /// /// </description> public void ChangeMaterial(uint slot = 0, MaterialAsset newMat = null) { InternalUnsafeMethods.ChangeMaterial__Args _args = new InternalUnsafeMethods.ChangeMaterial__Args() { slot = slot, newMat = newMat.ObjectPtr, }; InternalUnsafeMethods.ChangeMaterial()(ObjectPtr, _args); }
/// <summary>Change one of the materials on the shape.</summary> /// <description> /// This method changes materials per mapTo with others. The material that is being replaced is mapped to unmapped_mat as a part of this transition. /// </description> /// <remarks> Warning, right now this only sort of works. It doesn't do a live update like it should. /// </remarks> /// <param name="mapTo">the name of the material target to remap (from getTargetName)</param> /// <param name="oldMat">the old Material that was mapped</param> /// <param name="newMat">the new Material to map</param> /// <code> /// // remap the first material in the shape /// %mapTo = %obj.getTargetName( 0 ); /// %obj.changeMaterial( %mapTo, 0, MyMaterial ); /// </code> public void ChangeMaterial(string mapTo = "", Material oldMat = null, Material newMat = null) { InternalUnsafeMethods.ChangeMaterial__Args _args = new InternalUnsafeMethods.ChangeMaterial__Args() { mapTo = mapTo, oldMat = oldMat.ObjectPtr, newMat = newMat.ObjectPtr, }; InternalUnsafeMethods.ChangeMaterial()(ObjectPtr, _args); }