Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Jan 16, 2019 at 12:36 AM by nicholas96rossetti for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by nicholas96rossetti · Jan 15, 2019 at 11:37 PM · double

Double are calculated only when I use debug.log with them ?

I have a double variable that is calculated only when I use debug.log() on her, why?,Hello, i have a function that calculate a double and return it, then I add it to another double and I use it for a path finding solution. The problem is when I don't do Debug.log( varName); where varName is my first double the program skip the function and leaves my varName = 0;

Comment
Add comment · Show 5
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image xxmariofer · Jan 15, 2019 at 11:50 PM 0
Share

there is no way thats happening, can you paste your code so i can take a look? cant help you without.

avatar image nicholas96rossetti xxmariofer · Jan 15, 2019 at 11:59 PM 0
Share

densita = Game$$anonymous$$anager.CalcoloDensita(casellaVicina.getX(), b.mappa[start.piano].getY() - 1 - casellaVicina.getY());

//Debug.Log(densita); if I remove the comment it will calculate the densita, if not no

costoTotale = nodoCorrente.costo + densita + 1;

     public static float CalcoloDensita(int x, int y)
     {
         float valueTemp = -1;
         List<TrackingTileData> listaT = Game$$anonymous$$anager.getIstance().listaT;
         foreach (TrackingTileData var in listaT)
         {
             if (var.x == x && var.y == y)
             {
                 valueTemp = var.value;
                 break;
             }
         }
         if (valueTemp == -1)
         {
             return 0;
         }
         if (valueTemp > 70)
         {
             valueTemp = 70;
         }
         return valueTemp / 70;

     }
avatar image xxmariofer nicholas96rossetti · Jan 16, 2019 at 12:08 AM 0
Share

can you put a break point at the end of the CalcoloDensita method? just before the return and make sure if in both cases is entering the method and check valueTemp value?

Show more comments

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

98 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Menu button needs to be double clicked. 4 Answers

Score Points and Animation 0 Answers

How to round or convert doubles? 2 Answers

Cant convert double to float? 1 Answer

How to make a variable double value? 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges