Beispiel #1
0
 /// <inheritdoc/>
 public override ISensor CreateSensor()
 {
     // NOTE Validate / update settings.
     Validate();
     Sensor = new GridSensor(GetPixelGrid(), m_CompressionType, m_SensorName);
     return(Sensor);
 }
Beispiel #2
0
        /// <inheritdoc/>
        public override ISensor[] CreateSensors()
        {
#if (UNITY_EDITOR)
            if (Application.isPlaying)
            {
                EditorUtil.HideBehaviorParametersEditor();

                CoroutineUtil.Stop(this, m_Debug_OnSensorCreated);
                m_Debug_OnSensorCreated = new InvokeAfterFrames(
                    this, Debug_ToggleDrawGridBuffer).Coroutine;
            }
#endif


            m_GridSensor = new GridSensor(
                m_SensorName, m_GridBuffer, m_CompressionType, m_ObservationType);

            if (m_ObservationStacks > 1)
            {
                return(new ISensor[]
                {
                    new StackingSensor(m_GridSensor, m_ObservationStacks)
                });
            }

            return(new ISensor[] { m_GridSensor });
        }