protected void Allocate() { m_Shape = m_PixelGrid.Shape; if (m_Compression == SensorCompressionType.PNG) { m_Texture2D = new Texture2D(m_Shape.Width, m_Shape.Height, TextureFormat.RGB24, false); m_Bytes = new List <byte>(); } }
/// <summary> /// Initializes the grid. /// </summary> /// <param name="shape">The grid's observation shape.</param> /// <param name="name">The name of the grid instance.</param> public PixelGrid(GridShape shape, string name = "PixelGrid") : base(shape, name) { }