UnityEngine.MaterialPropertyBlock.Clear C# (CSharp) Method

Clear() private method

private Clear ( ) : void
return void
        public extern void Clear();
        [MethodImpl(MethodImplOptions.InternalCall), ThreadAndSerializationSafe]

Usage Example

コード例 #1
1
 private void InitializeColorChangeSystem() {
     _primaryMeshMPB = new MaterialPropertyBlock();  // default color is black
     _primaryMeshRenderer.GetPropertyBlock(_primaryMeshMPB);
     _primaryMeshMPB.Clear();    // in case the renderer had properties other than the default properties
                                 // renderer's existing MaterialPropertyBlock color is also black, implying that the existing property block is the default, at least wrt color
     _primaryMeshRenderer.SetPropertyBlock(_primaryMeshMPB);
 }
All Usage Examples Of UnityEngine.MaterialPropertyBlock::Clear