/// <summary> /// Set the textures to apply to the faces of an object /// </summary> /// <param name="simulator">A reference to the <seealso cref="OpenMetaverse.Simulator"/> object where the object resides</param> /// <param name="localID">The objects ID which is local to the simulator the object is in</param> /// <param name="textures">The texture data to apply</param> /// <param name="mediaUrl">A media URL (not used)</param> public void SetTextures(Simulator simulator, uint localID, Primitive.TextureEntry textures, string mediaUrl) { ObjectImagePacket image = new ObjectImagePacket(); image.AgentData.AgentID = Client.Self.AgentID; image.AgentData.SessionID = Client.Self.SessionID; image.ObjectData = new ObjectImagePacket.ObjectDataBlock[1]; image.ObjectData[0] = new ObjectImagePacket.ObjectDataBlock(); image.ObjectData[0].ObjectLocalID = localID; image.ObjectData[0].TextureEntry = textures.ToBytes(); image.ObjectData[0].MediaURL = Utils.StringToBytes(mediaUrl); Client.Network.SendPacket(image, simulator); }