public override bool LoadAsset(BinaryReader reader) { if (!base.LoadAsset(reader)) { return(false); } Data = new TextureAssetData(); Data.Width = reader.ReadInt32(); Data.Height = reader.ReadInt32(); int channelsCount = reader.ReadInt32(); Data.ChannelsCount = (ChannelsCountEnum)channelsCount; int bytesPerChannel = reader.ReadInt32(); Data.BytesPerChannel = (BytesPerChannelEnum)bytesPerChannel; Data.ColorSpace = (ColorSpaceEnum)reader.ReadInt32(); Data.buffer = reader.ReadBytes(Data.Width * Data.Height * channelsCount * bytesPerChannel); return(true); }
public override bool ImportAsset(string path, string ext) { Data = TextureLoader.LoadTexture(path, ForceSRgb); return(true); }