public static void Set(EntityBase 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 NativeMaterialMethods.SetMaterial(entity.GetEntityHandle(), mat.Handle, slot); }
public static Material Get(EntityBase entity, int slot = 0) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (entity == null) throw new ArgumentNullException("entity"); #endif var ptr = NativeMaterialMethods.GetMaterial(entity.GetEntityHandle(), slot); return TryAdd(ptr); }