Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002
    Location
    Los Angeles, CA
    Posts
    3,607

    Too many heap sections

    Hi all,

    I'm refactoring some existing C# code and all of the sudden I get:

    "Fatal error in gc
    Too many heap sections"

    Unity crashes to desktop...

    I have no idea were to begin to track this down, any ideas?

    All I did in the refactoring is created a public Vector2 variable that gets initialized in the Start function.
    Then I used it to replaced some redundant code in that class which was basically doing a basic arithmetic calculation.

    Thoughts?

  2. #2
    Join Date
    Apr 2002
    Location
    Los Angeles, CA
    Posts
    3,607
    I can narrow down the crash to a specific change.

    This works!
    float nCost = node.IsDiagnal(current) ? 7 : 5;
    This doesn't!
    float nCost = node.IsDiagnal(current) ? valueA : valueB;
    Assuming that
    valueA
    and
    valueB
    are float values and were initialized in the Start function.

    Anyone?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •