Search Unity

UniDDatabase 2.0

Discussion in 'Made With Unity' started by namoricoo, Jun 3, 2011.

  1. victor-biosphera

    victor-biosphera

    Joined:
    Jun 21, 2010
    Posts:
    67
    Hi namorcoo, your package was working great for me eith Macos ans Windows, right now, im starting to work with android, and i cant make it work , i think it was creating the .uddb file, i need to change any configuration?
     
  2. victor-biosphera

    victor-biosphera

    Joined:
    Jun 21, 2010
    Posts:
    67
    I just upgrade the package, and now it works nice with android, thank you!
     
  3. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534
    The latest version of the product does work with Android, web,Mac, and PC. I can see you already downloaded the latest version of the code. Enjoy the rest of your day.
     
  4. dwjkim

    dwjkim

    Joined:
    Aug 19, 2013
    Posts:
    8
    What is the maximum number of columns it can have? Mine keeps saying invalid data when it has only about 40 columns.
     
  5. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534
    are you importing a file or are you creating a new one. I've had files with over 250 columns and not experience any problems.
     
  6. dwjkim

    dwjkim

    Joined:
    Aug 19, 2013
    Posts:
    8
    for (int idx = 9; idx < worktotalcolumn; ++idx)
    {
    workparameters[idx-9] = UniDDatabaseCs.GetArrayOfIntInColumn(gui.workdata, UniDDatabaseCs.GetColumnName(gui.workdata, idx));

    }


    Hi, I tried above code, with about 40 rows and 33 columns.
    since the loop starts from 9, it loops 24 times.
    And it turns each column into an array.
    And it takes some time... to turn columns into an array.... of integers.

    How should I use it in order to speed it up?
     
  7. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534

    Only reason it would be slow if if you have it running in the main loop. if you have it in the main loop it will run every second and make things slow. You want to have it run in Start. It will execute one time ad finish.
    also "idx-9", worktotalcolumn, looks a little confusing. You should consider doing a less confusing (for indx=0, idx < worktotalcolumn; idx++), that way you are less likely to have index out of bound exceptions.
     
  8. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534
    To make a long story short, when you run the program in "start" it will one once and cache all of the values in the array for future reference. The same way I do it in all of the examples. However, if you run the program in "update" it will slow things down because it will keep getting the same data, once per frame for no reason and waste resources.
     
  9. dwjkim

    dwjkim

    Joined:
    Aug 19, 2013
    Posts:
    8
    Thanks but I actually did put it in a method IEnumerator Start, before yield return null.

    The speed I am talking about is the delay in "start". It seems to run only once, yes, but that once takes a few seconds.
    And I've taken your advice and changed the idx = 9 to idx = 0 and replaced worktotalcolumn with worktotalcolumn - 9 in the maximum.
     
  10. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534
    "it's running once for a couple of seconds. " like you said. "SECONDS..." I don't know if there is a way to make it faster. It's faster than Sqlite. I have no control over the Unity code. The unity code is executing my code. The unity code is platform dependent. The faster the platform.The faster the code will execute. So if you want it to go faster, you have to move to a faster system...
     
  11. dwjkim

    dwjkim

    Joined:
    Aug 19, 2013
    Posts:
    8
    Thanks but it is not "a couple" but more like almost 20 seconds. It is on PC platform, but the game is to be on mobile platform and it will have longer loading time on mobile given this.

    It's in awake function of game manager. Something
     
  12. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534
    like I told you before. I have no control over the unity code. Only thing my code does is automate a lot of the Unity actions. When a game is loading, unity has to initialize a lot of things. As an experiment. Remove all of code and try to duplicate the same functionality yourself. You won't notice a big difference in time. However, you'll notice an astronomical difference in the amount of code you have to write.
     
  13. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534
    final example. Try loading a file with 2 text columns and ten rows. It will go very fast. try loading 2 texture columns with ten rows, it will be much slower to load than the text columns. Finally if you load 2 prefab columns with 10 rows. It will be slower than the previous two combined. Is my code slow or is the unity code for loading pictures slow.

    So in conclusion, when a game is starting up, a lot of unity processes have to initialize that I have no control over. if you don't believe me reproduce the functionality of your game without any of my code and see if you get your game to start faster than 20 seconds.
     
  14. dwjkim

    dwjkim

    Joined:
    Aug 19, 2013
    Posts:
    8
    Thanks and now I am trying to getarrayofboolincolumns.

    This is not working and it shows everything as false. any idea why this is happening?

    I just checked the tip in the window and it uses int for bool?
     
    Last edited: Sep 4, 2013
  15. phoenixrising

    phoenixrising

    Joined:
    Aug 9, 2013
    Posts:
    57
    I am interested in this product but I am curious if it uses LoadFromCacheOrDownload or has any type of cache? So if the player downloads the assets then it doesnt need to download them every time in the future, rather, it keeps a local copy and checks the server only for a new version.

    http://docs.unity3d.com/Documentation/ScriptReference/WWW.LoadFromCacheOrDownload.html

    Also, is it compatible with LoadFromCacheorDownload if it doesnt currently use it?
     
  16. namoricoo

    namoricoo

    Joined:
    Apr 14, 2011
    Posts:
    534
    At the moment I have an example for working with remte assets.