//---------------------------------------- public DataObjectBase GetObject(Object obj) { if (obj == null) { return(null); } if (objects.ContainsKey(obj)) { return(objects[obj]); } if (obj is Shader) { var dataobject = new ShaderObject(obj as Shader); objects[obj] = dataobject; return(dataobject); } if (obj is Mesh) { var dataobject = new MeshObject(obj as Mesh); objects[obj] = dataobject; return(dataobject); } if (obj is Texture) { TextureObject dataobject = null; dataobject = new TextureObject(obj as Texture); //dataobject = new TextureObject(Texture2D.whiteTexture); objects[obj] = dataobject; return(dataobject); } if (obj is FxCanvasObject) { var dataobject = new CanvasObject(obj as FxCanvasObject); objects[obj] = dataobject; return(dataobject); } if (obj is AnimationClip) { var dataobject = new AnimationClipObject(obj as AnimationClip); objects[obj] = dataobject; return(dataobject); } return(null); }
public Exporter(ExportMode mode = ExportMode.Generic) { _exportMode = mode; ShaderObject.RegisterShaders(); TextureObject.RegisterFormat(); //-----------time-------------------- { var obj = Object.FindObjectOfType <SceneConfig>(); var dataobject = new TimeInformation(obj); objects[obj] = dataobject; } }