Jump to content

Error pop and Terrain Texture ignores all the masks and spawns across the whole world


SwenSVK

Recommended Posts

Hello,

I have got this error while using noise mask and the textures ignores everything and just spawns across the whole world.

Can anyone tell me what I do wrong? Happens quite often honestly. Using spawn world button for spawning the biome. I have 5x5 terrain of size 1024.

IndexOutOfRangeException: Index was outside the bounds of the array.
Gaia.SpawnerEditor.RefreshTerrainPrototype (System.Int32 spawnRuleID, UnityEngine.Texture2D oldTexture, UnityEngine.GameObject oldGameObject, System.Int32 substanceIdx, System.Boolean isUserRefresh) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:6484)
Gaia.SpawnerEditor.DrawTexturePrototype (System.Boolean showHelp) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:6761) Gaia.SpawnerEditor.DrawRuleResourceSettings (Gaia.SpawnRule rule, System.Int32 spawnRuleID, System.Boolean helpEnabled) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:5795)
Gaia.SpawnerEditor.DrawSingleRule (Gaia.SpawnRule rule, System.Int32 spawnRuleID, System.Boolean helpEnabled) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:5303)
Gaia.SpawnerEditor.DrawSingleRulePanel (Gaia.SpawnRule rule, System.Int32 ruleIdx) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:4737)
Gaia.SpawnerEditor.DrawRegularSpawnRules (System.Boolean helpEnabled) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:4454)
Gaia.SpawnerEditor.DrawSpawnRulesPanel (System.String nameKey, System.Action`1[T] contentMethod, System.Boolean& toggleAllState, System.Boolean unfolded) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:4222)
Gaia.SpawnerEditor.OnInspectorGUI () (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:1559) UnityEditor.UIElements.InspectorElement <>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <e749addbc2164fa58381bb665457218b>:0) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)'.

 
 

GaiaError-min.png

Link to comment
Share on other sites

I have got also this error, quite often - mostly when I assign Substance material to TextureProtoSubstance or when deleting such a layer using substance. But it can happen randomly.

Error:

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 <31c0f51ac5a24a22ba784db24f4ba023>:0)
Gaia.SpawnerEditor.OnInspectorGUI () (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:1588)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at <e749addbc2164fa58381bb665457218b>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
 

Link to comment
Share on other sites

Another two common errors I get when saving either project or e.g. spawner profile:

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical ()
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,UnityEngine.GUIStyle,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (string,System.Action`1<bool>,bool,UnityEngine.GUILayoutOption[])
Gaia.SpawnerEditor:DrawAdvanced (bool) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:2471)
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,UnityEngine.GUIStyle,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (string,System.Action`1<bool>,bool,UnityEngine.GUILayoutOption[])
Gaia.SpawnerEditor:OnInspectorGUI () (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:1565)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
 

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical ()
Gaia.SpawnerEditor:DrawSpawnRulesPanel (string,System.Action`1<bool>,bool&,bool) (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:4258)
Gaia.SpawnerEditor:OnInspectorGUI () (at Assets/Tools/Procedural Worlds/Gaia/Scripts/Editor/SpawnerEditor.cs:1559)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
 

Link to comment
Share on other sites

One more again. This is just appearing in the editor without even doing any action. There must be something wrong that is poping a lot of errors basically constantly.


EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical ()
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,UnityEngine.GUIStyle,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (UnityEngine.GUIContent,string,System.Action`1<bool>,bool,bool,bool,UnityEngine.GUILayoutOption[])
PWCommon5.EditorUtils:Panel (string,System.Action`1<bool>,bool,UnityEngine.GUILayoutOption[])
Gaia.TerrainLoaderManagerEditor:OnInspectorGUI () (at Assets/Tools/Procedural Worlds/Gaia/Scripts/MultiTerrainSystem/Editor/TerrainLoaderManagerEditor.cs:102)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)

Link to comment
Share on other sites

Hi @SwenSVK, while these errors can be annoying, these can be safely ignored. The errors mean that there was an issue while drawing the Editor UI during a single frame, but that is then usually corrected by itself in the following frame. A bit of background regarding to why those are happening and why it is difficult for us to fix those:

In general the error message tells us that a layout group (e.g. a panel, or a horizontal or vertical arrangement of input fields on the Editor UI) is being closed before one has been started. In the simplest case this would mean there is an error in one of the GUIs of Gaia where a code block containing UI was not started / ended properly. In this case the error would spam permanently, and it would take a minute to fix only.
However there are also cases where it is not so obvious - for example when something happens while the UI is in the process of being drawn that leads to the layout groups begin-end not matching up anymore. A relatively simple example would be when a button press triggers an action that prevents the UI from being drawn all the way to its end. In this case it is easy to fix as well because one would need to simply to stop UI processing together with the button press.

And then there are cases where it can get really difficult - no button is being pressed, but for one, two frames of UI drawing this error is being thrown - to find out why that happens only in very special occasions and not all the time while the UI is being drawn, can be very time consuming.
With the more recent Unity versions something has changed with the way the UI is processed that made scripts more vulnerable towards this error, this is why you are more likely to see this in the newer Unity versions. Gaia is not the only application that struggles with this, this error can also be found in Unity itself, please see these threads for example:
https://forum.unity.com/threads/endlayoutgroup-beginlayoutgroup-must-be-called-first.523209/
https://forum.unity.com/threads/endlayoutgroup-beginlayoutgroup-must-be-called-first.839116/
https://forum.unity.com/threads/error-endlayoutgroup-beginlayoutgroup-must-be-called-first.1039525/
https://forum.unity.com/threads/endlayoutgroup-beginlayoutgroup-must-be-called-first.909482/

If you find a spot where this prevents you from working with Gaia or makes it difficult to see other errors, please let us know so we can prioritize working on those over other aspects of development.

Link to comment
Share on other sites

On 2/17/2022 at 3:56 AM, Peter said:

Hi @SwenSVK, while these errors can be annoying, these can be safely ignored. The errors mean that there was an issue while drawing the Editor UI during a single frame, but that is then usually corrected by itself in the following frame. A bit of background regarding to why those are happening and why it is difficult for us to fix those:

In general the error message tells us that a layout group (e.g. a panel, or a horizontal or vertical arrangement of input fields on the Editor UI) is being closed before one has been started. In the simplest case this would mean there is an error in one of the GUIs of Gaia where a code block containing UI was not started / ended properly. In this case the error would spam permanently, and it would take a minute to fix only.
However there are also cases where it is not so obvious - for example when something happens while the UI is in the process of being drawn that leads to the layout groups begin-end not matching up anymore. A relatively simple example would be when a button press triggers an action that prevents the UI from being drawn all the way to its end. In this case it is easy to fix as well because one would need to simply to stop UI processing together with the button press.

And then there are cases where it can get really difficult - no button is being pressed, but for one, two frames of UI drawing this error is being thrown - to find out why that happens only in very special occasions and not all the time while the UI is being drawn, can be very time consuming.
With the more recent Unity versions something has changed with the way the UI is processed that made scripts more vulnerable towards this error, this is why you are more likely to see this in the newer Unity versions. Gaia is not the only application that struggles with this, this error can also be found in Unity itself, please see these threads for example:
https://forum.unity.com/threads/endlayoutgroup-beginlayoutgroup-must-be-called-first.523209/
https://forum.unity.com/threads/endlayoutgroup-beginlayoutgroup-must-be-called-first.839116/
https://forum.unity.com/threads/error-endlayoutgroup-beginlayoutgroup-must-be-called-first.1039525/
https://forum.unity.com/threads/endlayoutgroup-beginlayoutgroup-must-be-called-first.909482/

If you find a spot where this prevents you from working with Gaia or makes it difficult to see other errors, please let us know so we can prioritize working on those over other aspects of development.

Thank you very much Peter for response. At this point the bug is not preventing me from other work so I will try to ignore that and see 🙂
If anything, I will update you.

 

Ivan

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...