//----------------------------------------------------------------------------------- private void RefreshSimulationScript() { if (Data.SimulationScript != null && simulationScript_ != Data.SimulationScript) { simulationScript_ = (CarSimulationScript)Data.SimulationScript; simulationScriptEditor_ = Editor.CreateEditor(Data.SimulationScript); } if (Data.SimulationScript == null) { simulationScript_ = null; simulationScriptEditor_ = null; } }
private static void RegisterSimulationScripts(List <CNScriptPlayerEditor> listSpEditor) { foreach (CNScriptPlayerEditor spEditor in listSpEditor) { if (spEditor.IsEnabledInHierarchy && !spEditor.IsExcludedInHierarchy) { spEditor.InitSimulationScriptObject(); CarSimulationScript simScript = spEditor.GetSimulationScript(); if (simScript != null) { listSimulationScript_.Add(simScript); } } } }