It's a plugin used to analyze and troubleshoot Unity games. This is not a save feature and I'm not looking for way to save and load game state. Is there a way to get the shader property and the type required to retrieve their values with the Material.GetXXX functions? If this is not possible, is there any way to dump the shader data individually? I expect many shaders from third party sources to be in the project and it would be complicated to manually go over each shader, copy their property names and the type so that I can obtain the data. The problem is that I need to know the names of properties and which type it is such as Texture, Matrix, Float, Color and so on before I can obtain their values during run-time Texture mat1Tex = mat.GetTexture("_MainTex") I know I can obtain these formation with the Material.GetXXX functions.įor example, I can currently obtain the main Texture from the standard shader which has a Texture type property named _MainTex with: Material mat = gameObject.GetComponent().material I am stuck when trying to do the-same thing for the shader data such as Textures and Matrix, Vectors and int values and floats. I am trying to create a function that dumps every Resources data in a Unity game to a file and was able to dump the video, audio, script names and the image on the screen from the current loaded scene.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |