Quantcast
Viewing all articles
Browse latest Browse all 6

Answer by msknapp

So I added lines to mark my game objects, and their components, dirty using the EditorUtility.SetDirty function. I also added the "BuildAssetBundleOptions.CompleteAssets" to my arguments that build the asset bundle. Unfortunately what I'm saving into the asset bundle does not match what comes out when I load it into my scene. assets Before save:
Index, Name, type
0, C4 Terrain, GameObject
1, Building on C4, GameObject
2, Group_1_1, GameObject
3, Mesh1, GameObject
4, Group_2_1, GameObject
5, Mesh2, GameObject
6, Mesh3, GameObject
7, Mesh4, GameObject
* I verified through the debugger that the terrain object transform indeed has the correct position. assets After loading (order does not matter, changes each time):
Index, Name, type
0, C4, GameObject
1, C4, Transform
2, Mesh1, Mesh
3, Mesh2, Mesh
4, Mesh3, Mesh
5, Mesh4, Mesh
6, C4, TerrainData
7, SplatAlpha 0, Texture2D
* All objects are brought in at the world origin, my changes to the position were lost again. And yet again, if I look into my project tab, and view the transform attached to my building prefab (not scene instance), the position is at the world origin. My changes to the prefab are not being persisted. I think that maybe "SetDirty" needs some kind of follow up step? I looked through the EditorUtility but could not find anything. Any ideas?

Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>