-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Materials #79
Feat: Materials #79
Conversation
Add Scene Content Provider and loading from the directory
Add tests coverage
Explorer/Assets/Scripts/ECS/StreamableLoading/Components/Common/ForgetLoading.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/Scripts/ECS/StreamableLoading/Systems/ConcludeTextureLoadingSystem.cs
Show resolved
Hide resolved
Explorer/Assets/Scripts/ECS/StreamableLoading/Tests/ConcludeTextureLoadingSystemShould.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing PR. Left some comments/questions, but overall it looks good to me
HandleQuery(World); | ||
} | ||
|
||
[Query] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ve seen you started using queries without descriptors. Is this intentional? Wouldnt this query all components in the ECS world?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default the types corresponding to the arguments are included to the query, it will not query all entities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, what you are saying, the All
descriptor is not necessary when params are present in the method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
Explorer/Assets/Scripts/SceneRunner/ECSWorld/ECSWorldFactory.cs
Outdated
Show resolved
Hide resolved
Explorer/Assets/Scripts/ECS/Unity/Materials/Tests/CleanUpMaterialsSystemShould.cs
Outdated
Show resolved
Hide resolved
if (!entityReference.IsAlive(World)) | ||
return; | ||
|
||
World.Destroy(entityReference); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about adding a DeleteEntityIntention
, and have just one system destroy everything that needs to be destroyed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good idea, we still don't have a system to destroy entities?! Do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it further, and I will leave it as is:
DeleteEntityIntention
is really good forSDK
Components as we don't drive their life-cycle- Structural changes are expensive and I would like to avoid them when possible
- In this case, the loading process is fully finished to this moment so we need to read data and destroy the entity, it does not make much sense to postpone it.
- The clean-up itself is signaled by
ForgetLoadingIntent
, otherwise clean-up should happen inConcludeLoadingSystem
Explorer/Assets/Scripts/ECS/Unity/Materials/Tests/LoadMaterialFromCacheSystemShould.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # Explorer/Assets/Scenes/SampleScene.unity # Explorer/Assets/Scripts/CrdtEcsBridge/Tests/CRDT.ECS.Bridge.Tests.asmdef # Explorer/Assets/Scripts/ECS/ComponentsPooling/Tests/ComponentsPooling.Tests.asmdef # Explorer/Assets/Scripts/SceneRunner/ECSWorld/ECSWorldFactory.cs
return true; | ||
} | ||
|
||
Debug.LogError($"{nameof(SceneContentProvider)}: {url} not found in {nameof(fileToHash)}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should discuss how logging should be handled in the PoC - one major issue now is that we have nothing to distinguish between user error (from the scenes themselves) and errors that we should fix. Leading to millions of partially ignored errors! Ideally for performance we should not even have logging at runtime?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's discuss
Known limitation: |
Get rid of MaterialsCache as it performed very bad
* Introduce Materials and textures loading * Add Scene Content Provider and loading from the directory * Simplify asm distribution * Change Launcher to use Directories * Change default Shader to DCL
Closes #37
Material
based on the material data. Potentially it will help if the same material setup is used in a scene, and less likely across scenesMaterials
which entities are dyingApply Material System
will apply materials to the renderers butPrimitives
PR should be merged firstContentProvider
is added to take care of permissions and URLs translationScene Launcher
is modified to support directories insteadMaterial Cache
is a private dependencyContentProvider
andEntities Map
are shared dependenciesComponents
so no other scoped dependencies are necessary to share in any case