Hi. I just tested pushing to repo with my artist, and we’re getting a lot of bugs
On fresh project: making a scene, make stuff with tile rule tool, then restart editor (or simply by undo in his case), and come back to it. All the tiles are no longer connected to GS. Delete tile doesn’t delete anything, placing new tiles are not connected with the tiles previously placed, etc. All the tiles are parented to the grid, can be toggled visible, and cleared from the GS inspector. But can’t interact with them any more
This also happens in our working repo, on both machines
Bug on different machines:
The black scene + prefab previews not showing. On mine, re-open the scene fixes it. On his, re-open doesn’t fix this. Tools work tho
Changing around my repo to his repo, then back to my repo, involves a single type of error log spam. They’re different depending on the situation, but mostly nullref. Below is an example
The effect is no GS tool can be activated, some windows fail to draw (in 1 case it’s the Prefab Manager, in another it’s the Tile Rule).
NullReferenceException: Object reference not set to an instance of an object
GSpawn_Pro.TileRuleProfileDbUI.createRuleUIs () (at Assets/GSpawn - Level Designer (PRO)/Scripts/Level Design/Object Spawn/TileRuleProfileDbUI.cs:593)
GSpawn_Pro.TileRuleProfileDbUI.onBuild () (at Assets/GSpawn - Level Designer (PRO)/Scripts/Level Design/Object Spawn/TileRuleProfileDbUI.cs:121)
GSpawn_Pro.PluginUI.build (UnityEngine.UIElements.VisualElement rootElement, GSpawn_Pro.PluginWindow targetWindow) (at Assets/GSpawn - Level Designer (PRO)/Scripts/UI/PluginUI.cs:66)
GSpawn_Pro.TileRuleProfileDbWindow.onBuildUI () (at Assets/GSpawn - Level Designer (PRO)/Scripts/Level Design/Object Spawn/TileRuleProfileDbWindow.cs:14)
GSpawn_Pro.PluginWindow.OnGUI () (at Assets/GSpawn - Level Designer (PRO)/Scripts/UI/PluginWindow.cs:81)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEditor.DockArea.OldOnGUI () (at <1650f973f32045d6bc81eca6beea8ea9>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b47ea342d1544b0d882d830fdc1f4f55>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
One time, deleting the GS object and re initialize the scene (and other things maybe?) fixed the bug above. But now i tried that, and now ending up with this error whenever my mouse is on top of inspector
ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.Collections.Generic.List`1[T].get_Item (System.Int32 index) (at <694551e795764b938030a3128fac2b36>:0)
GSpawn_Pro.EditorUIEx.profileNameSelectionField[TProfileDb,TProfile] (TProfileDb profileDb, System.String label, System.Single labelWidth, System.String selectedName, System.Boolean showMixedValue) (at Assets/GSpawn - Level Designer (PRO)/Scripts/Core/Extensions/EditorUIEx.cs:159)
GSpawn_Pro.TileRuleGridSettings.<buildUI>b__37_0 () (at Assets/GSpawn - Level Designer (PRO)/Scripts/Level Design/Object Spawn/TileRuleGridSettings.cs:77)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <b47ea342d1544b0d882d830fdc1f4f55>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
edit:
Perhaps it’s bcoz TileRuleGrid._tileMap is Dictionary, and that’s not serialized to scene save