46 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
0
answers
23
views
Safety of using non-primitive objects in Unity ECS (DOTS)
I'm making ECS project rn, an some of my components have string variables in it. Unity complains that strings are not primitive and marks this as red flag in console. Should I worry about and replace ...
1
vote
0
answers
53
views
Debug Log not working with entity Sub scene (Unity, C#)
So I am working on a project that has a bunch of dynamic fog objects and I wanted to try and use DOTS for it, basically it is a ton of small sprites that shrink when the player approaches. I got all ...
1
vote
0
answers
92
views
How to connect unity dots client and server using unity Relay
I'm trying to make my DOTS game playalbe via Unity Relay. The issue is my client doesn't connect to the server even though I pass port and ip to it.
Thats my connection manger code
public void ...
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 ...
1
vote
1
answer
663
views
Overriding backend due to platform constraints
I'm trying to optimize using the Burst Compiler on an iOS device.
The Unity version is 2020.3.48f1, and the Burst Compiler version is 1.6.6 During iOS build, I'm encounting the following error.
If ...
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
1
answer
2k
views
Entity Query for ISystems and SystemBase in Unity ECS 1.0
I have a tile based building game in Unity ECS 1.0, where I add particular IComponentData to several systems. From a PlayerInput which is a MonoBehavior (because PlayerInput and InputActions are not ...
0
votes
2
answers
820
views
Unity Dots Rendering Issues
My entities dosen't seen in the scene and game window. But they are in the entites hierarchy
private void Start()
{
EntityManager entityManager = World.DefaultGameObjectInjectionWorld....
1
vote
2
answers
2k
views
Invalid Entity | The entity does not exist anymore
I am Super new to ECS and DOTS, but wanted to now finally give it a shot. I very quickly ran into a problem where I cannot find anything online.
When I create an Empty Game Object in a Subscene and ...
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 ...
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?
1
vote
0
answers
137
views
In unity dots physics,is there any way to scale mesh collider?
In traditional physics engine,we can scale the mesh collider by changing the scale in Transform property.
What about in dots physics,I've tried adding the scale property but it doesn't work.
In ...
0
votes
1
answer
2k
views
How to transform (rotate, scale etc.) an entity without structural change in Unity DOTS
I actually try to rotate objects that are described as an Entity in Unity Dots. I know there are Rotation components to do so. But the entities do not automatically have it, when I create them from ...
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 ...
1
vote
0
answers
248
views
Unity ECS, Initialize a PhysicsColliderKeyEntityPair buffer
I have an entity with multiple PhysicsCollider that RaiseTriggerEvents only.
I think I cannot have a child entity that contains a PhysicsCollider IComponentData, so I think I have to use ...
1
vote
1
answer
683
views
Many compilation errors after importing DOTS editor
I'm trying to learn how to use DOTS, and I can't seem to get it to compile in a blank project.
I installed the following packages into a new unity project using editor version 2021.3.6f1:
com.unity....
1
vote
1
answer
302
views
Component System OnUpdate Running Unintentionally in Other Scenes (Including New Ones)
I have a class that inherits from ComponentSystem in ECS and for some reason the OnUpdate function is being called unintentionally in every scene. Even if I create a new blank scene, the loop is ...
1
vote
1
answer
1k
views
Unity ECS : System does not find entities
I am having a problem with Unity ECS. My system does not find my entity with its query. This is my setup : I am currently testing with just one entity, that is created by a prefab, using this function ...
1
vote
1
answer
395
views
RTT (Round Trip Time) always return Zero in Unity DOTs Project
I'm trying to use the DOTsSample Unity project and want to use this NetworkStatistics Class
(https://github.com/Unity-Technologies/DOTSSample/blob/master/Assets/Scripts/Game/Main/...
1
vote
0
answers
165
views
Unity DOTS Cubes don't want to move properly
Hello i am currently learning DOTS but encountered a problem.
I want to move some cubes but they don't want to. My System Script looks like this :
protected override JobHandle OnUpdate(JobHandle ...
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 ...
0
votes
1
answer
3k
views
How benefitial is Unity DOTS for normal games?
I know that the big benefits of DOTS and ECS can be seen when the game contains a lot of objects which hold the same data, so that they can be put together in chunks of memory and easily iterated ...
0
votes
1
answer
1k
views
Unity Job System throwing range exceptions and telling me to call jobHandle.complete() even though I have it
Here's the error I cant really make sense of, I don't get why the index is -1? and all these errors im getting are offset by -1.
IndexOutOfRangeException: Index -1 is out of restricted IJobParallelFor ...
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....
1
vote
3
answers
5k
views
Unity ECS get entity transform
Is there any way to get transform component from entity? I know, there is new library for it, cant find. I could find only Translation. Maybe it's related with another way of getting entities? Maybe ...
0
votes
2
answers
1k
views
Unity c# null reference error when I build to my Iphone when I try to access an entities component data
I am building a game which uses an A* path finding system developed by CodeMonkey here:
https://www.youtube.com/watch?v=XomlTHitAug&list=PLzDRvYVwl53v55lu_TjC21Iu4CuFGQXVn&index=3
I modified ...
1
vote
2
answers
2k
views
Unity ECS on linux error when trying to start new 2D project
I have installed Unity on linux and everithing seems to work as expected when developing games in the standard model. However when I set up a project for ECS development, by installing the following ...
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, ...
5
votes
2
answers
5k
views
Where is 'FixedUpdate' in Unity DOTS (ECS)?
I am starting to find my way into using the DOTS (Data Oriented Technology Stack) method of making objects.
There are several samples all over, Youtube videos and also samples directly from Unity, ...
2
votes
1
answer
1k
views
Time.timeScale not working for Unity.Physics package (DOTS)
if I set Time.timeScale = 0; nothing changes, if set Time.fixedDeltaTime = 0; my physical objects begin to behave strangely, but do not stop completely.
Maybe someone knows how to change timeScale for ...
2
votes
0
answers
1k
views
Unity ECS/Burst on IOS
I have created a new project using Unity 2019.3.0f6 under macOS Mojave.10.14.6
Added a simple cube to the scene and included the following packages from the Package Manager:
Entities preview.11 - 0.5....
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....
0
votes
1
answer
3k
views
C#/Unity/Hybrid ECS - Trying to convert GameObject into ECS Entity
I am Using Unity 2019.2.14f.
Here is my code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Entities;
using Unity.Transforms;
using Unity.Collections;
...