public virtual void Write(SceneWriter scene, object component) { MonoBehaviour beh = component as MonoBehaviour; if (beh == null) { throw new Exception(GetType() + " cannot export components of type " + component.GetType()); } if (filter != null) { WriteFieldsForType(scene, beh, component.GetType()); } if (!options.Contains("noExport")) { scene.WriteScript(beh, !options.Contains("noOverwrite")); } }
public void Write(SceneWriter scene, object component) { MonoBehaviour beh = component as MonoBehaviour; if (beh == null) { throw new Exception(GetType() + " cannot export components of type " + component.GetType()); } if (filter != null) { WriteFieldsForType(scene, beh, component.GetType()); } if (options.Contains("Stub")) { scene.WriteScriptStub(beh); } else { scene.WriteScript(beh, false); } }