Пример #1
0
        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"));
            }
        }
Пример #2
0
        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"));
            }
        }
Пример #3
0
        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);
            }
        }
Пример #4
0
        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);
            }
        }