/// <summary> /// Loads a mesh for this entity. Can optionally load multiple meshes using entity slots. /// </summary> /// <param name="name">Path to the object (Relative to the game directory)</param> /// <param name="slot"></param> /// <returns>true if successful, otherwise false.</returns> public bool LoadObject(string name, int slot = 0) { if (name == null) { throw new ArgumentNullException("name"); } if (name.EndsWith("cgf")) { NativeEntityMethods.LoadObject(this.GetIEntity(), name, slot); } else if (name.EndsWith("cdf") || name.EndsWith("cga") || name.EndsWith("chr")) { NativeEntityMethods.LoadCharacter(this.GetIEntity(), name, slot); } else { return(false); } return(true); }