Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Reaching vertices limit(?) since updating to 4.5

Discussion in 'Editor & General Support' started by Carwashh, Jun 1, 2014.

  1. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    746
    I've just updated to Unity 4.5 and I'm now getting some errors that I wasn't getting before, and only when my death state has been triggered. I really don't understand what's going.

    When the player hits the exit successfully an NGUI is displayed -> wait -> everything is fine.
    When the player hits an enemy and dies, an NGUI is displayed -> wait -> below errors are displayed.

    Code (csharp):
    1. count <= std::numeric_limits<UInt16>::max()
    2. UnityEditor.DockArea:OnGUI()
    3.  
    4. maxVertices < 65536  maxIndices < 65536*3
    5.  
    http://www.screencast.com/t/0k3bcYsJQ

    This was all fine before.
    The only other thing I've changed since updating, is moving all my enums out of all the individual scripts, and put them into 1 'enums' script - not sure this would have an affect?

    Any help would be greatly appreciated, this issue makes my Unity crash.
     
  2. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    746
    Downgrading to 4.3 appears to have fixed the problem.
     
  3. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Could you submit a bug report along with a repro project if possible?
     
    Aurore likes this.
  4. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    746
    Yep, sure.
     
  5. adbourdages

    adbourdages

    Joined:
    Jul 8, 2012
    Posts:
    75
    Hitting the same error message except that this time it is in editor without the game running.

    Here's how to reproduce the error: add a Debug.Log(str) with a string that has 30000 character then run the game once so that the string is logger.

    When that string is visible in the console window, the error is triggered each frame.
     
    Fluzing likes this.
  6. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
    So, Unity creates a mesh to render the string. So, this mesh violates the supported size. I guess Unity should sanity check the string before it gets passed to the renderer. I guess the devs never thought someone would want to render a string that is too large to fit on-screen.
     
    BrandyStarbrite likes this.
  7. vickygroups

    vickygroups

    Joined:
    Apr 2, 2014
    Posts:
    16
    I have the same issue. I have NO 3D objects so no meshes. Deleted all my text, including instructions. The console just gives the same warning about vertices without pointing to a specific asset or page. Any way to narrow down the issue? Or should I go back to Unity 4.3? Or just a bug!

    In addition, it will not build AT ALL in iOS because the google play plugin by Unity can't find the active Android libraries. This wasn't an issue in 4.3 either. Screen Shot 2014-07-06 at 10.06.21 AM.png Screen Shot 2014-07-06 at 10.06.21 AM.png Screen Shot 2014-07-05 at 12.29.05 PM.png
     
    Last edited: Jul 7, 2014
  8. Fluzing

    Fluzing

    Joined:
    Apr 5, 2013
    Posts:
    815
    I had the same error. I had a large String in the console. Removing the Debug.Log of the string in my code fixed the problem.

    Thank you very much, adbourdages. You saved me a lot of trouble.
     
  9. Dustin-Horne

    Dustin-Horne

    Joined:
    Apr 4, 2013
    Posts:
    4,568
    Yes, the test scene that I created for my JSON .NET asset is now throwing the error as well for the exact same reason. I am serializing and outputting JSON strings to the console for validation (only in the test / example scene, not in the asset itself) which is causing the exception.
     
  10. xuanyusong

    xuanyusong

    Joined:
    Apr 10, 2013
    Posts:
    49
    I had same error . @Fluzing I removing Debug.Log bug does not work !
     
  11. benni05

    benni05

    Joined:
    Mar 17, 2011
    Posts:
    58
    The error also shows up when trying to setup a Font with Custom chars. This prevents me from generating a font texture inside the Unity Editor. The texture would be tiny but when pasting a lot of text in the text box "Custom Chars" for the font import settings the error immediately pops up in the Console and I cannot "Apply".

    UPDATE: Ok, I can actually hit the Apply button, which solves my problem.
     
  12. Carwashh

    Carwashh

    Joined:
    Jul 28, 2012
    Posts:
    746
    I upgraded to 4.5.2 not that long ago, and never received this issue. Unsure if I made any changes that fixed it, or the issue simply never occurred in this version.
     
  13. xuanyusong

    xuanyusong

    Joined:
    Apr 10, 2013
    Posts:
    49
    unity 4.5.1 Debug.Log(string) string's Lenght > 65535 unity will crash ~~~~~~~
     
  14. Graham-Dunnett

    Graham-Dunnett

    Unity Technologies

    Joined:
    Jun 2, 2009
    Posts:
    4,287
  15. JefferyChen

    JefferyChen

    Joined:
    Sep 9, 2014
    Posts:
    2
    I had same error ,i want know how can you slove when i don't upgrade the unity to 4.6,
     
  16. xuanyusong

    xuanyusong

    Joined:
    Apr 10, 2013
    Posts:
    49
    thank you 大大~~
     
  17. truemeat

    truemeat

    Joined:
    Apr 29, 2015
    Posts:
    1
    i removed Debug.Log() and it solved
     
  18. sheng319

    sheng319

    Joined:
    Jun 23, 2014
    Posts:
    34
    Still error on 4.6.7p1. I wrote test code as follows.

    Code (CSharp):
    1. IEnumerator Start()
    2. {
    3.     var sb = new StringBuilder();
    4.        
    5.     // work on 4.6.3p4
    6.     //for (int i = 0; i < 100000; i++)
    7.     //{
    8.     //    sb.Append("囧");
    9.     //}
    10.  
    11.     // work on 4.6.7p1
    12.     //for (int i = 0; i < 16352; i++)
    13.     //{
    14.     //    sb.Append("囧");
    15.     //}
    16.  
    17.     // error on 4.6.7p1
    18.     for (int i = 0; i < 16353; i++)
    19.     {
    20.         sb.Append("囧");
    21.     }
    22.  
    23.     var str = sb.ToString();
    24.     while (true)
    25.     {
    26.         Debug.Log(str);
    27.         yield return new WaitForSeconds(0.2f);
    28.     }
    29. }
    Bug report case 712411
     
  19. sheng319

    sheng319

    Joined:
    Jun 23, 2014
    Posts:
    34
    I got a reply. I am curious about is, why it can more than 16352 on version 4.6.3p4? but not on 4.6.7p1?
     
  20. kevinlan

    kevinlan

    Joined:
    Jul 3, 2013
    Posts:
    2
    I have asked the same question : "why can i do this?"
    There are no problem on 4.6.3p4 before I upgrade to newest version of 4.x.
    I really need to print out all messages received via network and do some debug.
     
  21. Xwilarg

    Xwilarg

    Joined:
    Jul 13, 2016
    Posts:
    21
    I have the same problem trying to use Mesh.CombineMesh():
    Code (CSharp):
    1. //Code
    2. cubeObjects = new GameObject[arrCube.Count];
    3. combine = new CombineInstance[arrCube.Count];
    4. for (int i = 0; i < arrCube.Count; i++)
    5. {
    6.      cubeObjects[i] = arrCube[i].getGameObject();
    7.      combine[i].mesh = arrCube[i].getGameObject().GetComponent<MeshFilter>().sharedMesh;
    8.      combine[i].transform = arrCube[i].getGameObject().transform.localToWorldMatrix;
    9. }
    10. arrCube[0].getGameObject().GetComponent<MeshFilter>().mesh.CombineMeshes(combine);
     
  22. 8Eye

    8Eye

    Joined:
    Oct 11, 2014
    Posts:
    40
    Did you find a way around this. Im having the same issue, im trying to combine 50 simple cube meshes into one but having this error...