public static void Set(EntityWrapper entity, Material mat, int slot = 0) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (entity == null) throw new ArgumentNullException("entity"); if (mat == null) throw new ArgumentNullException("mat"); #endif MaterialInterop.SetMaterial(entity.EntityHandle, mat.Handle, slot); }
public static Material Get(EntityWrapper entity, int slot = 0) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (entity == null) throw new ArgumentNullException("entity"); #endif var ptr = MaterialInterop.GetMaterial(entity.Handle, slot); return TryGet(ptr); }