28 questions
0
votes
1
answer
52
views
Can't use DOTS in unity 6.2
I wanted to study using ECS for a new project. But after I imported them using the git urls provided by the official site, i ran into some error messages:
here are the packages i have:
I have ...
0
votes
2
answers
185
views
Runtime Error when having a managed object in ISystem. Unity.Entities 1.3.10
RenderMeshArray field in an ISystem produces a runtime error:
ArgumentException: ‘HexGridRenderSetupSystem’ cannot be constructed as it does not inherit from ComponentSystemBase
Unity.Entities....
1
vote
0
answers
87
views
Unity DOTS Physics Collider - Collider Type Compound
I am learning DOTS with a specific goal.
I have an Entity: a Skeleton, with some Limbs and the Limbs have their own Health and can be killed. When that happens, they drop to the ground.
I work in a 3D ...
0
votes
1
answer
269
views
Unity ECS - How to modify the element of a DynamicBuffer
I have this piece of code:
foreach (DynamicBuffer<Items> items in SystemAPI.Query<DynamicBuffer<Items>>())
{
...
}
I am trying to modify a specific element of items. This is how ...
0
votes
1
answer
59
views
Unity ECS The Prefab in Subcene is mounted on object script, and if there is a Baker script on Prefab, Subcene cannot load anything?
There are sub scenes in the main scene, and there is a cube with a TestAuthoring script hanging on it
using Unity.Entities;
using UnityEngine;
class TestAuthoring : MonoBehaviour
{
public ...
0
votes
1
answer
296
views
How to change material color of a single entity in SystemBase’s OnUpdate among a lot of similar objects?
I use Unity for a long time, but I’m new to ECS.
I have created a SystemBase to change the color of some entities spawned but not all of them. I want to highlight a sub set of my entities.
I created ...
0
votes
2
answers
212
views
Entity not rendering after moving using EntityCommandBuffer in Unity DOTS
I am new to Unity DOTS and for a starter project, I want to move some ship entities given the speed and direction. This is my system:
namespace Obscure.SpaceShooter
{
[BurstCompile]
public ...
-3
votes
1
answer
334
views
Unity ECS - The type could not be found - CS02
I have many problems with my Unity ECS like this one.
Firstly, in a script like that (with many imports for tests) :
using Unity.Collections;
using Unity.Entities;
using Unity.Mathematics;
using Unity....
0
votes
0
answers
225
views
Unity ECS: Segmentation fault when creating a large number of entities
I wrote a simple test program that creates 100 entities per frame, each entity has a buffer, as follows:
void Execute(Entity projectileEntity, [ChunkIndexInQuery] int chunkIndex, ref LocalTransform ...
1
vote
1
answer
770
views
I made the same thing with ECS and classic C# ways and got similar performance results
Well, there is simple AI logic. In Idle state, each cube finds the closest cube as target and follows them until reaches it than, it searches another closest cube. I tried it with both C# and unity ...
0
votes
1
answer
624
views
How to set and access later to another entity's property from an entity in Unity ECS?
I am trying to make a simple AI logic that has 3 states; Idle, Chase, Attack. In Idle state human entities should set their targets, in Chase state they will chase and ultimately Attack. I made it but ...
0
votes
2
answers
192
views
nullable generics type function in C# Unity
I am working on a system for spatial partitioning in unity dots and currently.
the workin example function looks something like this
partial struct CharCopyJob : IJobEntity
{
public ...
0
votes
1
answer
785
views
Unity ECS Aspects ComponentType Unkown
I am new to Unity ECS and I have troubles creating a custom aspect.
Honestly I am a little bit helpless, why I better describe what I did and give the corresponding error messages.
Info: I'm running ...
1
vote
1
answer
988
views
Why does my Unity ECS simulation move all objects to the same position?
I am trying to learn the Unity Dots / ECS system, and am running into a really incomprehensible issue that has me completely stuck. I am trying to build a life simulation that has a collection of ...
0
votes
3
answers
3k
views
Unity ECS | Entities don't render/show up
I'm trying to create a new game with Unity ECS following these tutorials:
https://www.youtube.com/watch?v=H7zAORa3Ux0
https://www.youtube.com/watch?v=IO6_6Y_YUdE
However I'm seem to be stuck already ...
0
votes
1
answer
483
views
UNITY How do I change image position?
Below is a snippet of code thats running every update but when I log the local position of the image it still says 0,0,0 when it should be 10,10,10. What am I doing wrong??? Ultimately I am trying to ...
1
vote
2
answers
1k
views
Unity ECS - Not visible in Scene View [closed]
I have a simple Unity project using the Entities and Entities Graphics packages, and it is working fine in the Game View but not visible in the Scene View. Have I missed a step?
0
votes
1
answer
904
views
Can Unity 2022 with ECS 1.0 be built onto the Quest 2 with scripting backend IL2CPP?
I made a Unity 2022 project that uses ECS 1.0 which works fine in the editor and on the Rift S, but when I build it for the Quest 2 it crashes. If I switch to Mono it works. I had the same issue with ...
4
votes
1
answer
2k
views
How can I freeze / constraint a PhysicsBody's rotation in Unity DOTS?
I was trying to port a small test project from Unity Engine to learn about Unity New Fishers DOTS && ECS.
It's a small project where I have a capsule with a Rigidbody and I move it from left ...
0
votes
1
answer
2k
views
Objects in unity scene and game view are disappearing when I adjust my view
So I'm trying to learn Unity DOTS and I've built out a program that renders a bunch of cubes. But for some reason, in both the game view and the scene view, when I move the camera around, the cubes ...
0
votes
1
answer
203
views
Unity ECS System Breaks After Namespace Change
I just realized that my gameplay logic broke after some (allegedly) harmless refactoring changes.
Going through my VCS history and some debugging I fond out that the problem was caused by a namespace ...
1
vote
1
answer
518
views
Visual Scripting Dots Package Assemble issue
So I just created a new project to mess around with visual scripting, ECS and DOTS but I'm having some issues to get some of the unity physics stuff to work VisualScriptingPhysics.cs it says that it ...
1
vote
0
answers
3k
views
How to make Unity DOTS Physics Ray cast works with ECS?
The problem:
I have 3 game objects, that have PhysicShape and PhysicBody(static) components. I convert it into entities and move on to the scene. I don't the objects will collide with each other, so I ...
1
vote
1
answer
4k
views
Unity Entities not rendering in play mode
I have tried to Instantiate an entity using code:
blobAssetStore = new BlobAssetStore();
GameObjectConversionSettings settings = GameObjectConversionSettings.FromWorld(defaultWorld,blobAssetStore);
...
0
votes
1
answer
2k
views
How do you reference an array item within nativeArrray<Entity> in ECS
I'm trying to do the following:
private void AssignPlayer()
{
EntityQuery playerQuery = GetEntityQuery(ComponentType.ReadOnly<PlayerTag>());
Entity playerEntity = playerQuery....
0
votes
1
answer
1k
views
EntityQueryBuilder.ForEach is not compiling with two ComponentData and one BufferElementData
I'm using the Unity Entity Component System. When I try to write the following code:
Entities.WithAll<SomeComponentData, SomeComponentData2, SomeBufferElementData>()
.ForEach((Entity ...
0
votes
1
answer
394
views
Encapsulation of Unity ECS using extension methods and singleton class, what do you think?
I've been thinking about some encapsulation of Unity ECS using extension methods and disposable singleton class for keeping references to common resources like BlobAssetStore or EntityManager, ...
2
votes
0
answers
2k
views
How to spawn units using DOTS?
I am following this talk https://www.youtube.com/watch?v=BNMrevfB6Q0 and try to understand how to spawn units as I click my mouse (for testing purposes).
For this in general, I created a UnitBase etc....