sebas77 / svelto.miniexamples Goto Github PK
View Code? Open in Web Editor NEWSvelto.ECS and Svelto.Tasks Mini Examples for Unity
Home Page: http://www.sebaslab.com/
Svelto.ECS and Svelto.Tasks Mini Examples for Unity
Home Page: http://www.sebaslab.com/
It would be great to have at least a minimal multiplayer example with Svelto.ECS
I know that this might seem a bit beyond the scope, but:
Integrate inspector in miniexamples, it has problems
When trying to run the DOOFUSES_DOTS example I'm getting this exception
ArgumentException: Unknown Type:`Svelto.ECS.SveltoOnDOTS.SyncSveltoToDOTSEngine` All ComponentType must be known at compile time. For generic components, each concrete type must be registered with [RegisterGenericComponentType].
Unity.Entities.TypeManager.ManagedException (System.Type type) (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/Types/TypeManager.cs:1706)
Unity.Entities.TypeManager.ManagedException[T] () (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/Types/TypeManager.cs:1687)
Unity.Entities.TypeManager.GetSystemTypeIndex[T] () (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/Types/TypeManagerSystems.cs:1005)
Unity.Entities.World.AddSystemManaged[T] (T system) (at ./Library/PackageCache/com.unity.entities@1.0.8/Unity.Entities/World.cs:930)
Svelto.ECS.SveltoOnDOTS.SveltoOnDOTSEnginesGroup.AddSveltoToDOTSSyncEngine (Svelto.ECS.SveltoOnDOTS.SyncSveltoToDOTSEngine engine) (at ./Packages/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs:75)
Svelto.ECS.MiniExamples.DoofusesDOTS.SveltoCompositionRoot.ComposeEnginesRoot () (at Assets/Code/SveltoCompositionRoot.cs:100)
UnityEngine.Debug:LogException(Exception)
Svelto.ECS.MiniExamples.DoofusesDOTS.<ComposeEnginesRoot>d__3:MoveNext() (at Assets/Code/SveltoCompositionRoot.cs:103)
System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:SetResult(ValueTuple`5)
Svelto.ECS.MiniExamples.DoofusesDOTS.<LoadAssetAndCreatePrefabs>d__5:MoveNext() (at Assets/Code/SveltoCompositionRoot.cs:155)
UnityEngine.UnitySynchronizationContext:ExecuteTasks()
On line https://github.com/sebas77/Svelto.ECS/blob/master/com.sebaslab.svelto.ecs/Extensions/Unity/DOTS/UECS/SveltoOnDOTSEnginesGroup.cs#L72 in Svelto.ECS.
I'm using Unity 2023.1.7f1 instead of the 2023.1.0f1, but this error seems to be resulting from some facts that were known for quite some time already: https://forum.unity.com/threads/all-componenttype-must-be-known-at-compile-time.713900/ (circa 2019), so it should not be affecting this matter.
Note: This exception is not readily available to see, I had to explicitly search for why the example was silently just doing nothing, so I had to debug the code, and I put an explicit try-catch with debug output around that statement to catch the exception. Otherwise the exception is just silently ignored by Unity because it happens in another thread.
In the 6th example (the vanilla example), the comment said ID 1 but in the code an ID of 0 is created.
public class SimpleContext
{
...
//build Entity with ID 1 in group 0
entityFactory.BuildEntity<SimpleEntityDescriptor>(new EGID(0, ExclusiveGroups.group0));
compile error cause missing script 'UECSEntityComponent' .
in project https://github.com/sebas77/Svelto.MiniExamples/tree/master/Example1-DOTS-DoofusesMustEat/DOOFUSES_UECS
error message: Assets\Code\DoofusEntityDescriptor.cs(6,60): error CS0246: The type or namespace name 'UECSEntityComponent' could not be found (are you missing a using directive or an assembly reference?)
aha, i fix it , new script named UECSEntityComponent, code is:
using Unity.Entities;
using Unity.Mathematics;
namespace Svelto.ECS.MiniExamples.Example1C
{
public struct UECSEntityComponent : IEntityComponent
{
public Entity uecsEntity;
public float3 spawnPosition;
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.