Giter VIP home page Giter VIP logo

Comments (3)

michaelsakharov avatar michaelsakharov commented on June 4, 2024

Serialization now records the assets it comes across, so assets now track things they depend on.
So a model will record all the textures/materials it uses in "$dependencies" in the resulting SerializedProperty.

Next up is a way to get that information
Maybe
AssetDatabase.GetDependencies(FileInfo)
Maybe MetaFiles should also record that dependencies list for faster loading? that way it doesn't have to load the asset to get the dependencies.

from prowl.

michaelsakharov avatar michaelsakharov commented on June 4, 2024

Ok i have Dependencies being stored in Meta files now
Theres an issue though

Scenes for example serialize GameObjects into a SerializedProperty before being serialized AGAIN into the SerializedAsset
Im not sure how to get the dependencies from the Gameobjects to the final SerializedAsset
Since at the moment their returned in the context after serialization not the SerializedProperty, and even if they were inside the SerializedProperty as a field they would only exist for Compound properties, which fails for Scene's since the GameObjects are stored in a List property. I could work around with on the Scene side of things, but i'd rather the Dependency tracking be able to handle any case including this one.

So need to figure out a way for dependencies to support serializing already serialized things with their own dependencies.

from prowl.

michaelsakharov avatar michaelsakharov commented on June 4, 2024

Ok added SerializedProperty.GetAllAssetRefs(ref Hashset)
Which returns all AssetRef.AssetId's found inside the SerializedProperty

Im not a fan of hardcoding AssetRef stuff into SerializedProperties but it's the only cleanish solution I could come up with, that didn't involve any significant rewrites.

Now all asset types should fully track their dependencies inside the Meta File, and everything when serialized outputs the assets required to deserialize the resulting SerializedProperty! :D

from prowl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.