edited February 5 in ORK Support
Hi
I'm trying to reduce long load times (at app startup)
I have read the asset sources tutorial.

Currently, my project refers to all textures, audio clips, etc. as a direct referece.

Does changing the settings of my ork project to reference> resource have any advantages in load time?

As shown in the tutorial,
Resources:
"While Unity doesn’t recommend using Resources folders (learn more about this here), it’s still an easy way to reduce load time and memory issues coming from direct references and can be useful."

It is written above that it can reduce the load time than direct referece.
However, the official Unity document states that using the resource folder can increase the load time.

in my opinion, regardless of using "reference" or "resource" in editor, it seems like loading all of them into memory at app startup is the same.
What's the difference?

Is it more efficient in terms of load time and memory to use the resource folder than the direct reference?

The Asset Bundle is the best, but I don't have enough time to study.
As the ork editor gradually became larger, the load time at app startup increased.
Due to the nature of ork that loads everything into memory in the first scene, it seems that a suitable solution is needed.
Post edited by KESHYAS on
  • edited February 5
    To speed up the loading of the first scene after the splash logo
    Removed all icons of ability,weapon,armor. (set to None)
    Nevertheless, the loading time was not shortened.
    Um... could it be helpful to just put all the textures like the combat prefab and icon in the resources folder?
    Please tell me how to use the resource folder
    Post edited by KESHYAS on
  • Use (uncompressed) asset bundles - it's pretty much the only way to avoid these load times. With resources, I think Unity does that upon startup, while with references ORK will load it when it's initialized (via the game starter).

    The asset sources how-to also provides a tool for building uncompressed bundles. It's really not that complicated - all you have to do is select something in the project view (e.g. a folder or individual asset) and you can add it to asset bundles at the bottom of the inspector.
    You could just put all of your assets into a single asset bundle, building it as uncompressed, change it in ORK via the asset settings in Game > Game Settings and you're good to go.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited February 6
    Thank you for answer!
    1. Is it helpful to also use AssetBundles in Game Starter?

    2. I checked the use asset bundle and filled in the blanks appropriately,
    Project assets cannot be loaded.

    asset name OrkProject
    bundle name project
    path origin Streaming assets path (using script at tutorial)
    path blank
    load type load from file

    3.After changing all icons in editor to Asset Bundle,
    in running game
    I ran abilityshortcut.getIcon(); in my code, but I get a null reference error.
    Can't I use code like geticon when using Asset Bundle?

    Well... it's weird.
    Over the course of a few hours I changed everything in the editor to the assetbundle and finished the uncompress build(simple script downloaded at tutorial).
    Completed all possible actions and built.
    The loading time has not changed.
    We tested with and without gameStarter in the first scene (login scene).
    empty orkProject.asset> loadingtime 6s
    my full orkProject.asset> loadingtime 25s (terrible)
    (when ork is initialized, assetbundle "pack" load checked)

    This does not seem to be any difference from the direct reference.
    AssetBundles exist in streamingAssets.
    The server does not exist and does not download.
    Just because of the loading time and memory issues, I want to use it similarly to the resource folder.

    This is a major problem for my game (loading time)..
    I need advice.
    Post edited by KESHYAS on
  • edited February 6
    1. Uncompressed Asset Bundle only editor data (as you answered + tutorial guide)
    220mb , load time 20s

    2. Uncompressed Asset Bundle editor data + gamestarter (all one asset bundle 170mb)
    290mb , load time 30s
    (Rather, the load time increases by 10 seconds) - Here I thought. It takes a long time to read orkProject.asset

    3.direct reference (without asset bundle)
    99mb , load time 20s

    4. no OrkProject.asset include - load time 5s

    We tested all above cases.
    The load time does not change at all.

    In my opinion, in general mobile games, it is common to download AssetBundle data after a certain period of time after the first scene is loaded.
    However, since the Orc Game Starter loads the OrkProject.asset in Awake method, there seems to be a delay before the first scene(after splash logo) is displayed properly.

    um..if the OrkProject.asset is a culprit, I think i should be able to decide on my own timing to load the AssetBundle.
    If ork load the AssetBundle as soon as the scene starts, isn't there any difference from a direct reference?

    If there is an option to start loading the project after a certain amount of time delay,
    it will seem to be resolved(i think)

    If this isn't the case, I don't know why it doesn't reduce load times.

    My OrkProject.asset is almost 36mb.
    If i remove this file, the load time is 5 seconds(tested).
    However, as soon as i include this file in the project, the load time will be 20 seconds.
    I am having a very hard time on this issue Any help would be appreciated

    Sorry for the inexperience of English. Most of line use a translator.
    Post edited by KESHYAS on
  • edited February 7
    After testing all day for several days,
    The culprit of the terrible loading time was OrkProject.asset.
    It consists of countless xml strings (xml is slow read/write, many strings)
    As the ork project editor data grows, its size grows tremendously.
    (36mb in my case)

    This OrkProjcet.asset is read synchronously from GameStarter.cs> Awake function in the first scene. (LoadFromFile, not async)
    so Until this is done, the first scene will not be displayed on the screen.
    (After the splash logo disappears, it stops at that state)
    This process takes about 9 to 11 seconds. (Level where game launch is impossible in my case)

    Using GameStarter's "Use AssetBundle" doesn't seem to mean anything right now.
    (Rather, it makes the load time longer.)
    Load time is longer because bundles are loaded(+ unpacked) synchronously for the first time in the scene.

    This is fatal on mobile.
    The solution I thought was
    1. To reduce the capacity of OrkProject.asset as possible.
    (Especially the variable part makes the xml string longer.)

    2. Since OrkProject.asset uses xml, its disksize is bound to increase. Therefore, it is essential to use AssetBundle.
    However, Ork needs to load AssetBundle asynchronously.
    And should be able to display the progress of the load in the ui.(for ui/ux)
    Ork should use the LoadFromFileAsync function. (Ork doesn't support it yet) not LoadFromFile

    In other words, Ork must be able to load the AssetBundle asynchronously via the LoadFromFileAsync function (also delayed start options such as start after a few seconds).
    Then load OrkProject.asset.
    (Loading OrkProject.asset synchronously in awake does not load the first scene properly. laggy state)
    In this process, you should be able to use the progress bar of the first scene.
    (To inform the user that the game is not stopping and is proceeding correctly)
    I am frustrated at the completion stage of mobile rpg.
    As a result of countless tests, there seems to be no solution other than this one.
    Post edited by KESHYAS on
  • Using an asset bundle in the game starter wouldn't make a difference, because it still needs to load the ORK project anyway - using it there is mainly to allow updates at a later time, e.g. using a different project via an asset bundle.
    Asset bundles are used to prevent ORK from having to load every referenced asset, instead loading them from asset bundles when actually used somewhere (e.g. a prefab), which reduces initial load time and memory usage.

    Naturally, that doesn't affect the data you set up in the ORK project. I'll check out async loading in the game starter, but this will not be possible for other cases (e.g. getting prefabs, etc.).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited February 7
    I downloaded the demo project of the Ork tutorial and tested it. (Because this is my big problem)

    how to reproduce simply : android build - mobile test ( galaxy Note 10+ Pro)
    ORK Game Tutorial 2018 Project-

    OrkProject.asset 1.2mb (default setting)
    after build load time 3s

    OrkProject.asset 40 mb
    (Just create 200 equipment indexes with 20 equipmentVariables each )
    after build load time 13s

    OrkProject.asset 40 mb-Game Starter (Use assetBundle) streamingAssets -UncompressedBuild(as you answered)

    after build load time 15s (rather increases by 2 seconds)
    Post edited by KESHYAS on
  • KESHYAS said: OrkProject.asset 40 mb-Game Starter (Use assetBundle)
    after build-load time 15s (rather increases by 2 seconds)
    That's rather up to Unity, due to loading asset bundle here.

    As said, the ORK project data has to be loaded in any case - you'd use asset bundles to not have to load all the referenced assets at that point. Imagine having those 200 equipment full with 200 different icon images and 200 prefabs which would also need to be loaded at that point - having them in asset bundles instead of direct references in the ORK project will help a lot with load time and memory use.

    I'll check out async loading in the game starter for the ORK project, though :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • "I'll check out async loading in the game starter for the ORK project, though :)"
    Thank you. For mobile game retention, I need to reduce the load time (Unity Splash Logo> First Scene Entry Speed).
    First of all, in the test project above, 200 indexes were created without icons and without prefabs (just empty indexes with 20 empty variables).
    ㅡㅡㅡ
    1. After changing the editor reference setting to AssetBundle,
    when ORK.abilities.Get(i).getIcon() is executed in the script, null is returned.
    Should I use a different function to load the resource in the AssetBundle settings?
  • 1) No, that's also how ORK gets the icons, i.e. if it's working in ORK it should also work in your script.


    I've got a first test version for async loading in the game starter available, send me an email (contact@orkframework.com) with the Unity version you're using and I can send it to you to test it.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • wow..Thank you I just sent an email.
  • much appreciated thanks :) it works
Sign In or Register to comment.