/// <summary>
        /// Resets the object's properties.
        /// </summary>
        void Reset()
        {
            // Set the default values.
            UpdateRenderingObjectsList();
            launchOrderIndex      = renderingObjectCount;
            readyToBeLaunched     = false;
            _launchOnAwake        = true;
            _launched             = false;
            _previewRenderTexture = null;
            _previewEvalTexture   = null;
            // Get the processing component. If this was not called on AddComponent, reset it as well.
            _processing = GeneralToolkit.GetOrAddComponent <Processing.Processing>(gameObject);
            if (_processing.renderingCaller != null)
            {
                _processing.Reset();
            }
            else
            {
                _processing.renderingCaller = this;
            }
            // Initialize the rendering methods and helpers. This has to be done after the processing component has been reset.
            _renderingMethods = RenderingMethod.CreateOrResetRenderingMethods(transform);
            Method[] methods = GetComponentsInChildren <Method>();
            for (int iter = 0; iter < methods.Length; iter++)
            {
                methods[iter].InitializeLinks();
            }
            // Initialize the evaluation methods.
            _evaluationMethods = EvaluationMethod.GetOrCreateEvaluationMethods(transform);
#if UNITY_EDITOR
            UnityEditorInternal.InternalEditorUtility.SetIsInspectorExpanded(processing, false);
#endif //UNITY_EDITOR
        }
Esempio n. 2
0
 /// <summary>
 /// Resets the camera parameters and geometry processing parameters.
 /// </summary>
 void Reset()
 {
     // Reset the processing object.
     processing = GeneralToolkit.GetOrCreateChildComponent <Processing.Processing>(transform);
     processing.Reset();
     // Reset the geometry processing parameters.
     _geometryProcessingMethod = (Processing.PerViewMeshesQSTR)processing.processingMethods[ProcessingMethod.indexPerViewMeshesQSTR];
 }