How Unity3D Addressables make assetbundles easy and your project faster

Поделиться
HTML-код
  • Опубликовано: 24 дек 2024

Комментарии • 212

  • @chrisshouse9927
    @chrisshouse9927 4 года назад +21

    Thank you for this! Addressable’s + Data Binding + Observables + XML parser on the server , has my boss thinking I am genius when really all I truly am great at is watching your videos! Any tid bits on server client relations to dynamically working with timers would be the cherry on top.

  • @godmode3611
    @godmode3611 10 месяцев назад +1

    I love the way you put brackets for if and for (except I use brackets for one line if as well). And the underscore for private fields. After 10+ years working with Unity that is the way I prefer as well.

  • @MacMiggity
    @MacMiggity 4 года назад +22

    You are the new brackeys for me btw.

  • @Xerisis
    @Xerisis 4 года назад +1

    I did NOT know you could search the asset store from the search bar! Time saver for sure!

  • @larryp2206
    @larryp2206 2 года назад +2

    Incredibly useful tutorial for me. Yes there was some complexity, but it solves an equally complex problem which is keeping tracking of assets that are loaded into memory and how many are instantiated. Well done!

  • @QuiteTheGentleman
    @QuiteTheGentleman 5 лет назад +92

    The ratio of how important addressables is, to how much documentation is available, is abysmal. I've been trying to figure out basic implementation of instantiating and referencing addressable objects for about a week. I also can't find good examples on how to use addressable groups. I have a one-scene game that i'm trying to manage memory with, and i'd like to be able to have certain groups (biome specific objects, pretty much) loaded and unloaded into memory based on where my character is, but I can't even figure out how to control an object Instantiated using addressables.

    • @Whenslunchgames
      @Whenslunchgames 4 года назад +7

      We are in a very similar boat! A big open region that I have things turned on and off based on player location, but it isn't being removed and added to memory... it's all just sitting in memory. I'm hoping to find a solution to this soon, it's butchering my beta user base on mobile lol

    • @brainmold
      @brainmold 4 года назад +8

      @@Whenslunchgames Edit: I figured out what I was doing wrong. In the end I realised I had the Addressables "Play Mode Script" set to the default. Which is "Use asset database (Fastest)" this doesn't do anything with memory and acts like normal Unity. I set it to "Use Existing build" and then biuld it (with the pulldown next to it) and it works as advertised. :) You have to rebiuld when you add new Addressables but its not to bad.
      I don't think it was mentioned in the vid but I could be wrong.
      Old reply: Did you ever find out why it stays in memory. At the moment even the demo project Jason provided doesn't remove textures from memory on my end. Either I am doing something wrong or something changed on Unitys end...

    • @Whenslunchgames
      @Whenslunchgames 4 года назад +1

      @@brainmold I never figured it out myself. It hasn't fixed performance bottlenecks on my end but I could really be doing something wrong too lol

    • @MalrickEQ2
      @MalrickEQ2 4 года назад +4

      Unreal waiting for you :)

    • @Mr.Epsilion
      @Mr.Epsilion 4 года назад +1

      @@MalrickEQ2 Welcome to Dark side :)

  • @TheNoobGameDeveloper
    @TheNoobGameDeveloper 3 года назад +8

    Quick Update for anyone watching this after 10/2021, the texture memory on profiler remains the same even if everything works correctly, Go to Addressable Groups window -> Tools -> Window -> event viewer to check if the memory is released completely.

  • @justinwhite2725
    @justinwhite2725 5 лет назад +44

    This tutorial is at exactly the level where I'm at. I know you probably lost a few people glossing over the delegate methods.
    I was hoping you'd cover server assetbundles from a cloud or cdn. It seems that's where the system truly shines. Pretty much everything you have covered here I already had figured out (except for releasing the handle).

    • @Unity3dCollege
      @Unity3dCollege  5 лет назад +22

      I'll definitely do one on downloading and updating soon. I wanted to cover the basics then jump into that but it was getting long already :)

    • @mandisaw
      @mandisaw 5 лет назад +2

      +1 over here. I read the docs, and have seen/attended a couple of Addressables talks, but I'd like to see how it would work in a realistic (though small) scenario - patching an already-released game, or making different assets available for different builds (ex: by platform, by country or region).

    • @adrianalcomendras6754
      @adrianalcomendras6754 4 года назад +6

      @@Unity3dCollege is this video available right now?

  • @sabriboughanmi2435
    @sabriboughanmi2435 5 лет назад +47

    Good Tutorial! (I Like the Way you Explain Things)
    Can you please make a more advanced one about Addressables ?
    try to talk about :
    * how to use Addressables with Async Await
    * how to organize Groups (Static / Remote) + a Quick Preview Groups Settings
    * how to host DLCs and update Contents
    * try to give a quick preview of all profile settings Features.
    this will be awesome and unique on RUclips!

  • @spiral9316
    @spiral9316 5 лет назад +13

    I always recommend your tutorials to anyone who's really into making games or learning unity/c# you are the best anyways
    I also recommend bob Tabor and Eric lippert courses

    • @supertenchoo4271
      @supertenchoo4271 5 лет назад

      bob and sine eric lippert course can you give more details on these people eg website of them

    • @spiral9316
      @spiral9316 5 лет назад

      @@supertenchoo4271 hi,
      Had a typo on Eric's name.
      They are like c#101.
      bob Tabor is great for the first introduction to language , Eric just a steph above.
      You can find the basic videos on Microsoft academy site.. just Google "c# intro bob tabor Microsoft academy"
      Eric lippert.. I think I used O'Riley's site and went on to c# course page .. I think first month it's free.
      And some Linda course on c# and object oriented programming plus some books.. clean code and architecture by Uncle Bob martin
      That's about the basics of the language bob Tabor and Eric lippert and very good to start.

    • @gcodergr
      @gcodergr 5 лет назад +3

      John Skeet has an amazing contribution in stack overflow. I highly recommend his book “C# in Depth”.

    • @supertenchoo4271
      @supertenchoo4271 5 лет назад

      @@spiral9316 thanks man

    • @spiral9316
      @spiral9316 5 лет назад +1

      @@supertenchoo4271 yw. Also on books I recommend
      C# the ultimate reference, I discovered the more ambitions the book the more worth it because other books just handwaved the precious and really normative explanations(why to really do something, how you have to think about it and why) not a perfect book but the best on learning an intro to c# and it's history format makes it a really great explainer.
      On the ultimate reference the explanations are better(relative excellent), much more better than c# in depth(it felt like a tray of light) and I considered the c# in depth a very good book compared to others but ultimately if you want a book on c# the ultimate reference it's the only really Worth book on my experience, other are too concrete and evade lots of explanation really feels like the just want to give you exercises.
      The ultimate reference is more minded towards people who build things as opposed just college students like most other books.
      C# in depth is an ok book also recommend, just to have a reference because there's the ultimate reference.
      There's also a book on planning and predicting like estimates on how much time it's going to take to do something, that book was very useful to me at it got me the idea of what it takes to get something out there, things to consider etc.. it's an old book but very famous and useful if you are new to programming.

  • @penneyworth
    @penneyworth 3 года назад

    This video is the most useful info on addressable I have found. Thanks so much man!

  • @phobos2077_
    @phobos2077_ 4 года назад +1

    For the games I'm working on it makes more sense to load whole AssetBundles together during the loading screen and then just use them an a sync manner. Basically I want all the benefits of AssetBundles and async loading (small apk size, fast initial load time, smooth progress bars, etc.) but I don't feel like I need to have an AssetReference for every single asset that I use, like prefabs and whatnot. I think this way of using Addressables might be relevant for full open-world games when you have all kinds of assets sprinkled all over the place and you're just loading/unloading them as your camera moves. But even for such game I feel like the most efficient approach overall is to use split world into Scene Bundles and assets into normal bundles and use bundle dependencies to load/unload correct bundles in memory as you traverse the world. For example you approach a village, the village scene bundle gets requested which in chain requests a bunch of other bundles for village house textures and whatnot. So when your initial async operation for loading the village scene has reported completion - you have everything you need for that scene (and scene itself) loaded, so there's no need to use AssetReference at all, you should be able to reference assets within the Village scene directly.
    What am I missing?

    • @leo31420
      @leo31420 4 года назад

      Apart from more control over memory management, the point of addressable assets is to have an universal way to reference an asset. That asset may be in memory, in your hard drive, or in a server (unity provides a few solvers and you can implement your own).
      The async api is useful because you can locally instantiate an asset by it's name, even if you don't have such asset downloaded at the time. In your example imagine you go to the village for the first time, the client will lazily download and instantiates the houses and textures, and everything works fine because you Implemented everything async, contemplating the case the asset may not be there at the moment.
      Also there's a few problems with duplicated assets and dependencies in raw assetbundles, which may be reduced if you reference everything as strings.

    • @phobos2077_
      @phobos2077_ 4 года назад

      @@leo31420 I'm not convinced. In the village example you'd want to download all bundles for the game world up front, so that you can guarantee the village bundle loads to memory in an expected time frame.
      Regarding the issues like duplication of assets, AFAIK addressables only help you identify those issues, but they don't change how asset bundles work.

  • @marcolozano1348
    @marcolozano1348 4 года назад

    Jason, Awesome tutorial. First time commenting on any of your vids. One of the best subscriptions i've ever subscribed.
    Thank you so much for teaching this.

  • @megasupernewbie
    @megasupernewbie 4 года назад +2

    thanks for showing this. a better way to present this type of concepts might be to first introduce us by way of showing relevant API as a simple visual aid, then show a super simple example (maybe something like just a single mono behavior script that will load and unload the asset) and only then, for everyone sticking around you can proceed to walk through a more complex example.

  • @rubencruz2687
    @rubencruz2687 3 года назад +1

    Thanks!! I want to see more Addressables-related content! :D

  • @F3ND1MUS
    @F3ND1MUS 5 лет назад

    There is a private video on the Advanced Unity3d Tutorial Topics playlist Jason or whoever manages playlists😀
    Thank you for the help. I learn alot from these

  • @HedgehogNSK
    @HedgehogNSK 4 года назад +6

    Hello, Jason.
    Can you please explain why do you use Addressables.InstantiateAsync after Addressables.LoadAsync? The result of the load operation is GameObject, isn't it? As I understood from the documentation I should use LoadAsync and then I can use GameObject.Instantiate to result of operation or I can use directly InstantiateAsync, am I wrong?

    • @darkmattergamesofficial
      @darkmattergamesofficial 3 года назад

      Did you ever figure this out? Still curious about this myself. Thanks.

    • @IvovanderMarel
      @IvovanderMarel 2 года назад

      You are correct - you can and should just Instantiate directly. The LoadASync returns a reference to a prefab which can be instantiated directly. docs.unity3d.com/Packages/com.unity.addressables@1.3/manual/MemoryManagement.html#:~:text=To%20unload%20the%20asset%2C%20use,immediately%2C%20contingent%20on%20existing%20dependencies.

  • @KEM4OFFICIAL
    @KEM4OFFICIAL 5 лет назад +27

    What about a topic on update the content? Addressable's are more to it. I would love to hear your opinion on having local/remote servers, using s3 may be and how to publish content updates via remote. What about patches, since addressables are downloadable via remote and if by chance some of the levels broke up, you can re-send them the scene via addressables? What about prefabs that can be fixed and a patch can be deployed basically by adding updated content release and even fixing the game bugs? Store/Skins that can be published without a new game release (content update). There are huge possibilities here.
    This can even be used for artists to send in the fan art for the game, where skin textures are modded, accepted in some git repository maybe and then packed to the server on a daily basis.

    • @shyamarama
      @shyamarama 4 года назад +1

      KEM4 actually, this would be great. Any suggested links on the topic?

    • @mehmetonurtunc3747
      @mehmetonurtunc3747 3 года назад +1

      Heyy! Are there any tutorials or posts about this topic

  • @therimshak
    @therimshak 5 лет назад +1

    Very good indepth ... like always Jason

  • @lemuelapperson853
    @lemuelapperson853 2 года назад

    Thanks! Still banging on Addressables to better understand them. Your example was very helpful. I hope to re-tool my only game on Apple's App Store. The load time is way too slow for me.

  • @FullStackIndie
    @FullStackIndie 4 года назад

    Thanks so much man! Its definitely complicated but i was able to follow along and understand for the most part

  • @112Nelo
    @112Nelo 4 года назад +1

    Reading the documentation it seems like you don't need to both LoadAsync and InstantiateAsync. If you load async you get the prefab back and can instantiate it sync. InstantiateAsync just does both for you. The official docs:
    The main two ways are using the Addressables.InstanitateAsync API directly, or using the Addressables.LoadAssetAsync API and then manually instantiating the GameObject yourself.
    If you are instantiating a GameObject through the InstanitateAsync API, you have the convenience of allowing Addressables to do all the work of resolving the IResourceLocation if the key version of the API is used. Regardless which version of the API is used, Addressables downloads all the required dependencies, and instantiates the object for you. As a note, the instantation itself is synchronous. The asynchronous aspect of this API comes from all the loading-related activity Addressables does prior to instantiation. If the GameObject has been preloaded using LoadAssetAsync or LoadAssetsAsync the operation and instantiation becomes synchrounous. For example:
    docs.unity3d.com/Packages/com.unity.addressables@1.14/manual/InstantiateAsync.html

    • @deepSpaceLabs
      @deepSpaceLabs 2 года назад +1

      You can use both together as well, the difference is that if you use both the ref count will be 2. In my case, I don’t want to hold onto the LoadAsset handle, but instead release the object via the instantiated object. If you use the regular Instantiate method you cannot do that, you must use InstantiateAsync. So my pattern is use LoadAssetAsync, then InstantiateAsync. After instantiated I release the LoadAssetAsync handle which brings the ref count to 1. Assuming you do not instantiate more of the object, you can then use ReleaseInstance on the Result of the InstantiateAsync to bring the ref count to 0. Note, when you use InstantiateAsync after LoadAssetAsync completes, the InstantiateAsync is immediate.

  • @saeedbarari2207
    @saeedbarari2207 5 месяцев назад

    Late to the party but man just re-created a garbage collection system, claiming this is now easier than assetbundles 💀😅
    Nice video seriously! Old but gold

  • @daniyalniazi1771
    @daniyalniazi1771 Год назад

    I just hit like before his video even starts

  • @chadfranklin47
    @chadfranklin47 3 года назад +1

    Is there any benefit to using Addressables.InstantiateAsync() vs GameObject.Instantiate() if you are already using Addressables.LoadAssetAsync()? The docs state that after calling Addressables.LoadAssetAsync(), you can use the returned GameObject and just instantiate that normally, though the Addressables system won't know about those instances.

  • @darkvvulf
    @darkvvulf 3 года назад +7

    While this code is very clever, it's just a lot of extra confusion when all someone wants to know is the intro bare basics of how this system works. It would be better to just next time do the bare bones, and THEN expand it into all the clever pooling stuff.

    • @0Speedo
      @0Speedo 3 года назад +1

      yup, I hate when someone is trying to teach you one advanced thing but they combine it with other advaced thing making it unnesessarly complicated. Although I eventually understood everything he tried to teach it took me more time than it had to

    • @PeterSedesse
      @PeterSedesse 3 года назад +2

      Yeah, he could have maybe added a 3 minute section near the beginning using psuedo-code and explaining what objects each script is attached too and what it does.

  • @CirbyWeh
    @CirbyWeh 3 года назад +1

    I don't fully understand how the unloading works. In the Documentation it says that an AssetBundles can not be partially unloaded. So if you load Asset A, B and C, which are in the same bundle. And you unload B and C, they will still be in memory until the whole package is unloaded. Yet it looks like you actually do unload partially.
    Also; how would we unload everything? Do we just unloade A, B and C, or is there a necessary command to unload a whole package?

  • @shavais33
    @shavais33 3 года назад

    @17:58 - how/where is _particleReferences[] getting loaded.. how are you getting that asset reference?

  • @alon_vita
    @alon_vita 3 года назад +3

    We have a library of RuntimePrefabs. I was looking for a long time on how to improve this library - your video is spot on.
    If I understand correctly, the usage of Addressable goes much father than just loading prefabs in runtime. Is that correct? if so, a sequel would be awesome, for example, on how to use Addressables with third-parties like Google services etc.
    Thank you so much

  • @mqa7001
    @mqa7001 5 лет назад +1

    this is a good tutorial, I was finding to load assets from remote.

  • @kuinks
    @kuinks 4 года назад +17

    Suggestion: instead of showing a script that's been previously written with a walk-through you should instead write it from scratch. It's easier to digest and understand.

  • @MatthewTrecozzi
    @MatthewTrecozzi 5 лет назад +1

    Hey, does anyone have any more details on how Jason runs his Master Architects Course? The information on the link seems a little ambiguous as to actual start date and course structure.

    • @Unity3dCollege
      @Unity3dCollege  5 лет назад +1

      If you send me an email I can get you some more details tomorrow (wifes bday tonight). I'm working on making the page a little more clear (had put it together before the course opened), so answering your questions and updating that would be great for the FAQ as well and hopefully clarify things for everyone :) - jason@game.courses goes right to my gmail :)

    • @MatthewTrecozzi
      @MatthewTrecozzi 5 лет назад

      @@Unity3dCollege Thanks! I just sent an email with my general questions about course structure as well as some specific ones to my situation.

  • @ValentinLaulund
    @ValentinLaulund 4 года назад +3

    I tried to use this in one of my projects and also tried out Jason's source download project, on my side the Addressable profiler works fine, but the Textures memory in the old profiler never goes down again like in the video.
    What am I doing wrong?

  • @dbuitgames3219
    @dbuitgames3219 4 года назад

    That's useful! Thanks a lot for sharing this knowledge

  • @silkms
    @silkms 3 года назад

    very helpful video - thank you!
    Would be great if you also gave a demo of using a profile with a remote url to bring clarity to a not so obvious step!

  • @denisgoodman4492
    @denisgoodman4492 2 года назад

    Very good video, but I was understand it fully :) only after one year studying UNITY with C#

  • @RenegadeVile
    @RenegadeVile Год назад

    I'm assuming this is mostly useful for assets that need to be loaded into a scene after the scene has already started? Thinks like bullet GameObject in a pool?

  • @DigitalSummit
    @DigitalSummit Год назад

    I'm having an on my Quest app with addressable . My scene slows down when it is set as an addressable, and runs smoothly when loaded locally. I used Occlusion culling to get this fat scene to work smoothly at 90 FPS. Occlusion culling seems not working on Android addressable scenes could explain my problem.

  • @ZoidbergForPresident
    @ZoidbergForPresident 5 лет назад +42

    I had trouble understanding clearly everything. I think it'd have been good for you to display some diagrams before getting into the code, I think it'd have made things easier to grasp.

    • @HollyRivay
      @HollyRivay 4 года назад +2

      I'm from Russia, and this is at least 2 times more difficult with my knowledge of English and even using subtitles with translation.

  • @cgimadesimple
    @cgimadesimple Год назад

    Thanks for this tutorial!

  • @FlyVC
    @FlyVC 4 года назад +3

    When I try this exact example project, the Texture memory never gets freed anymore. The Adressables profiler works correct, but the regular profiler memory reading does not make any sense. Anyone else with this problem?

    • @brainmold
      @brainmold 4 года назад

      Yes same here, I was having this issue in my own project. Saw your comment and then checked the example project. Same problem, texture memory doesn't go down once the particle system is removed.

    • @chadfranklin47
      @chadfranklin47 3 года назад

      Same here (only in the Editor). When I ran it in the build, it worked as expected.

  • @marshmallow_fellow
    @marshmallow_fellow 4 года назад +2

    Is there a dark theme for you IDE? It's pretty jarring having it slam from dark to white when you open it.

  • @afewdragons
    @afewdragons 5 лет назад +1

    Well, added this to my projects to do list.

  • @DaniMarti_
    @DaniMarti_ 4 года назад +2

    Hi Jason, thanks for the video! I'm trying to use addressables for my enemies, instead of clicking I have a for loop to instantiate them, for some reason the loop doesn't work, it only creates two instances and then stops, it's like after the method instantiating from reference the loop stops. Any suggestion how to instantiate several enemies from a list of asset references? Thanks so much!!

  • @Max-yb1mx
    @Max-yb1mx 2 года назад

    This is great content!

  • @1000_Gibibit
    @1000_Gibibit 2 года назад

    One part about the Addressables API confuses me greatly. Why does Addressables.ReleaseInstance() exist? The documentation mentions something about ref counting, but what is it counting refs for? As far as I understand you can simply use GameObject.Destroy(). In your example, you are tracking instances and then releasing the asset by hand with Addressables.Release(). If you have to do this yourself then what is the use of ReleaseInstance()?
    If anyone can shine some light on this that would be greatly appreciated.

  • @tmi114
    @tmi114 4 года назад

    @Jason Weimann
    I want to make system which first will get the list of asset bundles available in addressables (to create a menu) and second when I update the bundles (add a bundle to list) I want to be able without updating application get the list of bundles with newly added one. How should a setup addressables to get this kind of result ?

  • @deepSpaceLabs
    @deepSpaceLabs 2 года назад

    I think there is a small mistake. If you call InstantiateAsync after LoadAssetAsync completes, the instantiation should be immediate/synchronous, therefore there is no need to use the Completed call back.

  •  2 года назад

    I created a prefab level system. Or should I do a scene system? When I exported to android with addressables, my game size doubled and it waited for 6 seconds after the unity logo at startup. Then I deleted the addressables and continued the game with Resources. Now when I run the game, my mobile phone gets hot at the twentieth level. There is an increase in both ram and cpu usage. What should I do? Can you help me?

  • @ManishKumar-y6p6u
    @ManishKumar-y6p6u Год назад

    Hey Jason thanks for this video
    I have a project with 41 sprite animation sequences that need to animate at 30fps, each from a set of 400 HD images. Keeping all of it in memory crashes the software. Can you please suggest something to optimise it or load all images form streaming assets and converting at runtime sprite possible.

  • @moshaaah
    @moshaaah 3 года назад

    Do we really need to release both the gameObject instance and the operationHandle?? I just used the Addressables.Release on the handle in my demo project, and the gameObject instance has been removed from the scene as well...
    [edit]:
    I found this on the Addressables doc in Memory Management section:
    "...the release method can either take the loaded Asset, or an operation handle returned by the load. For example, during Scene creation (described below) the load returns a AsyncOperationHandle, which you can release via this returned handle, or by keeping up with the handle.Result (in this case, a SceneInstance)."
    [edit 2]:
    The same doc, in GameObject instantiation section:
    "You would need to individually release each returned AsyncOperationHandle or GameObject instance."
    It says 'OR'... not AND...

  • @cuiapp9334
    @cuiapp9334 4 года назад

    Great. I have one problem for it. Can I use local addressables and remote addressables at the same time?

  • @andreyshade84
    @andreyshade84 4 года назад

    Thanks, for such a good explanation

  • @luiginicastro1101
    @luiginicastro1101 3 года назад +1

    This could be a dumb question but if you're working on a project that already uses AssetBundles, would you convert them to addressables or is there a system to change over?

  • @mohammadmoghaddam5266
    @mohammadmoghaddam5266 2 года назад

    Hi sir
    Does the use of addressable assets reduce the output size of the final apk of the game?!

  • @Thesupperals
    @Thesupperals 2 года назад

    The Addressables package made some drastic changes. I would still like to use this and can no longer follow along with your tutorial. You wouldn't happen to have a video with the newest version (1.18.19) would you?

  • @countingdemonstudios7181
    @countingdemonstudios7181 5 лет назад

    So at 3:40.... you are instantiating particles and the allocated memory doesn't drop back down immediately, wouldn't the garbage collector eventually take care of that, or am I mistaken?

    • @Unity3dCollege
      @Unity3dCollege  5 лет назад

      the instances go away with GC which is the small drop you see, but the memory from loading the asset is never freed because the asset is always there ready in memory to be instantiated again.

    • @countingdemonstudios7181
      @countingdemonstudios7181 5 лет назад

      Seems like you would run into insufficient memory crashes eventually if you aren't using addressables then. Is that correct?

  • @piotrw3366
    @piotrw3366 4 года назад

    Great tutorial. So if we store data in multiple scriptable objects instead of Reasorce.ReadAll we should now consider using addressables? Thanks for the tutorial!

  • @deoldgamer
    @deoldgamer 3 года назад

    can you explain how addressables connect to asset bundles? and how can I use all of it with the new unity cdn ?

  • @SkitzFist1
    @SkitzFist1 5 лет назад +4

    Welcome to live eleven!

  • @Beirud
    @Beirud 5 лет назад +2

    Any thoughts on DOTS and ECS?

  • @Ermelious
    @Ermelious 4 года назад

    is there a way to set AssetReference via code instead of in the inspector via the dropdown list?

  • @leonardomcpugo
    @leonardomcpugo 3 года назад

    Hey @jason what about using the "OperationException" property instead of doing the LoadAssetAsync/Dictionary?
    Thanks for your video :)

  • @blarghblargh
    @blarghblargh 3 года назад

    I haven't downloaded any sample code, but I looked at the code in the video and I think there might be some threading bugs.
    do you need to take a lock when creating/adding to the queue or draining it after load?
    I don't think Queue is thread safe, and regardless I think the code could end up starving the callback thread and potentially stalling other loads when a lot of spawns are queued unless you guarantee items can't be added while the callback is firing.
    I think there could be a race condition between checking if the async callback is done and enqueuing spawns for post-load, which could result in some spawns being lost/stuck in the queue. also, I think the public spawn method itself isn't thread safe, so you might get race conditions resulting in double instantiating the queue and losing some spawns, etc.
    If the asset manager's async implementation operates as a coroutine/on the main thread instead of on a background thread pool, then this all isn't really an issue of course. Dunno this system, hence why I'm watching the video!

  • @marcolozano1348
    @marcolozano1348 4 года назад

    Is it possible to access the script of an addressable prefab by code?

  • @GoodNewsJim
    @GoodNewsJim 2 года назад

    Yo, didn't Unity change so you need to manually copy resource folder into STANDALONE live build now?

  • @WesleyOverdijk
    @WesleyOverdijk 4 года назад

    Does loading also occur when referencing prefabs in scriptable objects?

  • @Gonzakoable
    @Gonzakoable 5 лет назад +1

    In the new talks they're pushing DOTS a lot will you do a video on it?

  • @DevDunkStudio
    @DevDunkStudio 3 года назад +1

    Nice guide!
    Doesn't this take up a lot more cpu time tho?

  • @DigitomProductions
    @DigitomProductions 4 года назад

    Hey Jason thanks for this video it cleared things up for me quite a bit. Are there other uses to this system besides spawning objects into the scene for efficiently? Does this make pooling obsolete? Thanks,

  • @hengky19071992
    @hengky19071992 5 лет назад

    nice tutorial,
    i have question sir,
    if i have image/icon asset that i use for UI/Button source image, then i put that image as addressable asset
    then how i reference that image as source image in the button (do we use script at runtime)?

  • @uchihakai4200
    @uchihakai4200 2 года назад

    I ran into some problems with Adressables after I build the game for testing, so far I found out I need to create a custom build script and add specific lines to it to make Adressables work after build.
    could you maybe make a video on how to solve this issue?
    thank your for you content!

    • @uchihakai4200
      @uchihakai4200 2 года назад

      I tried rebuilding the adressable, not the game project and it made it work after I built the game, yeay!

  • @cankozan1609
    @cankozan1609 5 лет назад +1

    Will there be more stuff about ML Agents or AI Planner ?

  • @kinggore5229
    @kinggore5229 3 года назад

    Why my texture memory won't get down after releasing the addressale asset?

  • @sps014
    @sps014 5 лет назад +50

    Next tutorial on DOTS please ;

    • @compilerdefiler3995
      @compilerdefiler3995 4 года назад +3

      no dots is still in preview

    • @sps014
      @sps014 4 года назад

      @@compilerdefiler3995 if i recall correctly DOTS was announced in 2018 GDC.

    • @jakehix8132
      @jakehix8132 4 года назад +1

      @@sps014 full engine rebuild. it's not gonna be included for 2019 LTS even.

  • @KevinUchihaOG
    @KevinUchihaOG 4 года назад

    Is there a way to get the other labels from a resourcelocation or assetreference? Let's say i have the labels: unit, enemy and ally, and i have a assetreference set with the labels (unit, enemy) and another (unit, ally). Then i load all assets with the label "unit" can i then get the information of the other label so i can sort the assets. So that i might have two lists one for enemies and another for allies and after loading all units i automatically sort them into the correct list by label.
    Another question, can i get an assetreference without linking it in the inspector? I would like to get a list of all assetreferences with a specified label/labels and put them in a List. I do not want to manually link all my assets in the inspector.

  • @JustYesntMan
    @JustYesntMan 3 года назад

    hi, i have a game idea that i want to do it in Unity and i need it to be modable.Imagine a very basic json file that contains info about an object.Like its model file, texture file and name for example and i need to create those in run time.Can anyone put me in the right direction ? Where should i start ?

  • @thecargs
    @thecargs 4 года назад

    Very nice video, thank you a lot :)

  • @fajriard3504
    @fajriard3504 4 года назад

    Hi Jason, can you help me? I had a different method for use addressable. But I'm referencing you for my use, and I get a little bit of error. Where I'm going to post my code? Thanks before.

    • @fajriard3504
      @fajriard3504 4 года назад

      Never mind, actually I get to managed by myself. Lol :))

  • @jameshorn7688
    @jameshorn7688 3 года назад

    I saw one of your tutorials on reducing texture sizes using the build report to shrink the resource.asset files in the build. I am new to Addressables but have gotten them to work in my project. I was hoping this would help shrink the resource.asset files but I see no change. If you could explain how to use Addressables to reduce the resource.asset file size that would be great. Thanks.

  • @juhainaahmed6090
    @juhainaahmed6090 5 лет назад

    Hi.. how can i use addressables ot build several scenes in my project..each project has a 360 video playing in it, a quiz canvas containing several buttons and a score canvas. how can I build them all and create an application file ot load locally in my vr headset..is there any of your videos on the same?

  • @haraldgundersen7303
    @haraldgundersen7303 5 лет назад

    Nice, what might be interesting is to store gameobjects in Azure blob storage and drag down and instance on demand. (Think World scale AR, objects based on GPS)….

  • @MrFaB0SS
    @MrFaB0SS 5 лет назад +1

    What IDE do you use? Is this rider?

    • @duramirez
      @duramirez 4 года назад

      yes, he actually says that at the beginning :)

  • @sanchitgngplays
    @sanchitgngplays 4 года назад

    please make a video on cloud content delivery in Unity

  • @lucabassclarinet
    @lucabassclarinet 4 года назад

    Thank you so much Jason for this tutorial!! I have an app and want to save videos online in order for the game to be lighter. Then, on a specific event, download the videos and be ready to play in a VideoPlayer, that would render in a Raw Image through a simple texture. Do you recommend me to use Addressables Remote? (I can't seem to make it work through Videoplayer Url) Do you have any tutorial related to video streaming/(downloading and destroying) that could be of help? Thank you again so much, really appreciate!

  • @yerasisaiprasadreddy
    @yerasisaiprasadreddy 5 лет назад

    Code structure of particular spawner is good.

  • @Sylfa
    @Sylfa 5 лет назад

    You did some multi threading unsafe things in those callbacks, are they always called on the main thread?

    • @duramirez
      @duramirez 4 года назад

      i don't see anything unsafe, he is just going through the dictionary, calling some enqueues and dequeues, nothing special about it. Perhaps you could explain what you mean by unsafe, because perhaps to me unsafe means something different, like not checking null references and dealing with memory addresses which in .net is used inside a unsafe {} block, and i really don't think unity would like that at all xD
      by the way i understand that the dictionary could be a ConcurrentDictionary to be thread safe but i am not sure how unity handles multi threading if at all, in this case if this is your question then i have the same question hahahaha xD

    • @Sylfa
      @Sylfa 4 года назад +1

      ​@@duramirez Yeah I meant not thread safe, not the unsafe keyword.
      Most of the time Unity just runs it all from the main thread, that's why it offers coroutines to simplify "multithreading". I can't recall if I found the answer, I'd assume it uses the main thread for the callback to avoid issues though.

    • @duramirez
      @duramirez 4 года назад

      @@Sylfa i saw some games using threads, making actuall calls to async c# methods. Not sure how common this is or if it makes any sense, i don't know what kind of code benefits from running out of Scale with the game in such a way, perhaps some database stuff with low priority? i don't remember what the purpose of the code was :(

    • @Sylfa
      @Sylfa 4 года назад

      @@duramirez There's some reasons, DOTS leverages multi-threading nicely for instance. Or for things that needs to be done but doesn't need to sync to the game, loading another level for instance (there's already Async methods for loading a scene though). If you have a game with a massive map for instance you might want to use it to load up new character models.
      Though as the saying goes: Some people, when confronted with a problem, think, “I know, I’ll use threads,” and then two they hav erpoblesms.

  • @pianosouls_yt
    @pianosouls_yt 2 года назад

    Could you make a tutorial about android / ios / or pc game update it's files without store or download new game build

  • @walaoRIKi
    @walaoRIKi 4 года назад

    Thanks, love it

  • @mrpinkdev
    @mrpinkdev 2 года назад

    I try to find this video every time I need to install addressables into new project. I just found it by searching "Unity Addressables Beard"

  • @gfulpakwuli3799
    @gfulpakwuli3799 4 года назад

    I suppose this is the best way (with addressable) to generate then dispose of objects that are instantiated repeatedly.
    I fell your: private readonly Dictionary _spawnerParticlesystem is like a tiny pool object. This whole demo seems to fully replace the need to create an FX pool the old fashion way (pre-instantiating 20 gameobjects in an array and looping though). Am I getting this right? Is there any downside in using this over a non addressable pool object system. Is there any significant Garbage collection issue with this system? Also how can the FX spawn so fast since it has to load asyn first? All right that is a lot a question :) The thing is that I picked up addressable 3 days ago, and I am loving it but hooked it up only into slower things, like loading game texture, preloading character sprites, never used it for fast pace stuff like SFX or VFX etc where I use traditionally pool system. Now I am thinking about getting rid of those system...

    • @UltromanTheTacoman
      @UltromanTheTacoman 2 года назад

      You're describing the difference yourself. Object Pools are for holding instances of things that are supposed to be ready to be spawned quickly, without the chance of a load delay. Addressables are for loading the data to be able to create the things to put in the pool in the first place. You're supposed to preemptively trigger your Addressables to load when you need them to be ready, not at the moment they're needed instantiation, as that's too late (most of the time, anyway; depends on what you're doing). Your Object Pool needs to be able to spawn instances when you tell it to prepare 10 instances of a thing, so before it can do that, the Addressables it needs to spawn those things must be loaded first. Otherwise the Object Pool will have to be able to wait for that to happen, and any code using the Object Pool has to be able to accept not being able to get an instance from the Object Pool when asking for one (which you may want them to, anyway, depending on how you're using your Object Pool).

  • @kharekelas4259
    @kharekelas4259 4 года назад

    I'm trying to use addressables in my game, but I found it very tedious compare to asset bundles. With asset bundles everytime I build the bundles, it only build the changed bundles to the same name locally. And in addressables it always build all of my resources even if they're not changed. And the addressables update method is totally not suitable for single player games. It's very slow for my build game iterations for I have to build all the resources everytime I make a small change on the scenes or UI or some single texture and try to see the results in a build. Is there anything I missed?

  • @travelsizedlions
    @travelsizedlions 4 года назад

    This is great! I was wondering if there was some way to control your memory usage in-game.

  • @samljer
    @samljer 4 года назад

    Machine learning in Unity would be great!

  • @mikemg4554
    @mikemg4554 4 года назад

    Does this way of implementing AssetBundles work on Android? I need something like that for and Oculus Quest game...

    • @Unity3dCollege
      @Unity3dCollege  4 года назад +1

      It should work fine there, great example of a good use case too

    • @kjmyer
      @kjmyer 4 года назад

      Did you get your build working with this method Mike? I am trying to do the same for Oculus Go.

    • @mikemg4554
      @mikemg4554 4 года назад

      @@kjmyer I hardcoded it, kinda. I assigned scriptable object to a gameobject and my game takes data from this s. object. It's fine on Quest, though.

  • @thatomogale9803
    @thatomogale9803 3 года назад

    Does anybody know how to load scenes with addressables using the Photon Engine?

  • @Arrjuun193
    @Arrjuun193 4 года назад

    Hey Jason,
    Been learning a lot from your videos. Thank you !
    I had this one question about Addressables/Asset Bundles.
    How are the newly created and attached scripts handled ?
    Let's say I have a published game. I create some new prefab with newly created scripts attached and build addressable. Are the scripts compiled and attached or should I rebuild the application and release an update for the addressable to work ?

    • @UmarFarooq-cu3gw
      @UmarFarooq-cu3gw 3 года назад

      Your newly scripts should work fine if they are working independently.. ie. not breaking the system (not 100% sure) It did work with assetbundles

  • @florinpricopie9112
    @florinpricopie9112 4 года назад

    Adressable work with scriptableobject?

  • @yudnai5577
    @yudnai5577 2 года назад

    you didn't use asset bundles groups. it was done automatically like magic or what? where does it reside in the computer? server? I want to know how can we go back from addressable to local and back in case of an error. seems to me once you are in there is no turning back.
    to upload the addressable to a server you need to create asset bundles in a folder and upload the files to the host. then read them back.
    can you show how you do it with a WebGL platform? say load a video player and a picture for example. with addressable. that will be cool.

  • @yerasisaiprasadreddy
    @yerasisaiprasadreddy 5 лет назад +3

    Please make a whole game tutorial using DOTS.