Instantiate Prefab Entity at runtime Using ECS 1.0

  Рет қаралды 6,533

WAYN Games

WAYN Games

Күн бұрын

Пікірлер: 32
@WAYNGames
@WAYNGames 2 жыл бұрын
Hello, I just noticed an autocomplement mistake at 06:26 . I meant to use the BeginSimulationEntityCommandBufferSystem but it autocompleted with BeginFixedStepSimulationEntityCommandBufferSystem. This as no impact on this tutorial but know that the BeginFixedStepSimulationEntityCommandBufferSystem is executed at a fixed rate and that BeginSimulationEntityCommandBufferSystem is executed every frame.
@hakanviajando
@hakanviajando 2 жыл бұрын
Thank you for the continued videos. You are doing great job.
@WAYNGames
@WAYNGames 2 жыл бұрын
Glad you like it 🙂
@markedforstrike
@markedforstrike 2 жыл бұрын
SpawnerSystem gives me an error "Cannot assign members of variable because it is a foreach iteration variable" when I try to change TimeToNextSpawn((
@WAYNGames
@WAYNGames 2 жыл бұрын
Hello, not sure why you have this error. Maybe you missed the ValueRW part of the eexpression ? You can check the full code here : github.com/WAYN-Games/DOTS-Training/blob/DOTS-108/Assets/Scripts/Systems/SpawnerSystem.cs If you still can't solve it, feel free to come post your code in discord wayn.games/discord . it will be easier to have a look there ;).
@핸섬맨-o8w
@핸섬맨-o8w 2 жыл бұрын
Thanks for making a great video. Will LevelUp and SkillSystem be included in this project?
@WAYNGames
@WAYNGames 2 жыл бұрын
Thanks for the compliments. The target project is a tower defense prototype so it will have some simple mechanics such as damage, enemy health, and "currency" earning on enemy death to be able to place more towers. But it won't cover a way to make an extensible RPG type skill or level up system. I have been working on an ability/combat system using DOTS, old version is available on my GitHub, but it's fairly complex and uses the previous version of DOTS. I try to find the time to work on it and, once I'll have good progress, I'll probably make devlogs about it.
@yurylebedev3161
@yurylebedev3161 2 жыл бұрын
I've created a baker, but the query run with the SystemAPI does not return any results. Any ideas where the failure point might be?
@WAYNGames
@WAYNGames 2 жыл бұрын
Are you using the system API in the baker or in a baking system ?? You can come on discord if you want. It's more suited to share code snippets;)
@yurylebedev3161
@yurylebedev3161 2 жыл бұрын
@@WAYNGames Thanks for the response! I was able to get it to work by moving the prefab to a sub-scene
@chengdun
@chengdun 2 жыл бұрын
hello, must I make a reference to any prefab I need in subscene ? but the prefabs are loaded according to what player chooses. how could i do?
@WAYNGames
@WAYNGames 2 жыл бұрын
Hello, something along those lines is covered in the video about tower placement. You need to create some kind of repository of prefabs in a subscene and then use that repository in your system to spawn the desired prefab.
@Gabriel-no6wv
@Gabriel-no6wv Жыл бұрын
My cubes aren't rendering at all....
@WAYNGames
@WAYNGames Жыл бұрын
Do you have the entities graphics package ?
@manuelraimondi4813
@manuelraimondi4813 Жыл бұрын
How to stop system from spawning entities?
@WAYNGames
@WAYNGames Жыл бұрын
You can either disable the system that runs the spawning logic, add a component to the spawner entity and exclude it using the WithNone SystemAPI call, or you can simply destroy the spawner. In a more real game, you would probably have a set of waves were the spawner would spawn x numbers of enemy at y interval then wait for all enemies to be destroyed (or z amount of time ) and go to the next wave.
@manuelraimondi4813
@manuelraimondi4813 Жыл бұрын
@@WAYNGames Thanks a lot for the quick reply!!👏👏👏 I solved it like this: // ... public void OnUpdate(ref SystemState state) { var ecb = SystemAPI.GetSingleton() .CreateCommandBuffer(state.WorldUnmanaged); foreach (var spawner in SystemAPI.Query()) { if (spawner.ValueRO.Times > 0) { Entity e = ecb.Instantiate(spawner.ValueRO.Entity); spawner.ValueRW.Times = spawner.ValueRO.Times - 1; } else { state.Enabled = false; } } }
@onerimeuse
@onerimeuse 2 жыл бұрын
I didn't even know I wanted something in the game I'm working on that works like a carrier of some kind (robot, aircraft, etc.) but.. Uh... Well, where my notepad go... Time to add yo my design doc. 😂
@mrbinggrae5954
@mrbinggrae5954 2 жыл бұрын
I am the first visitor of this video!
@WAYNGames
@WAYNGames 2 жыл бұрын
Thanks you for your continued support and interest in my content ! 😊
@mrbinggrae5954
@mrbinggrae5954 2 жыл бұрын
@@WAYNGames You didn't add BurstCompile to your SpawnSystem!
@WAYNGames
@WAYNGames 2 жыл бұрын
@@mrbinggrae5954 You are right. On such a small project the impact is minimal, buit it's better take good habits ;).
@mrbinggrae5954
@mrbinggrae5954 2 жыл бұрын
@@WAYNGames Shader [Universal Render Pipeline/Simple Lit] on [ms02_07_Skeleton] does not support skinning. This can result in incorrect rendering. Please see documentation for Linear Blend Skinning Node and Compute Deformation Node in Shader Graph.
@WAYNGames
@WAYNGames 2 жыл бұрын
Yes, that's the reason the skeleton is not animated. You'll see tomorrow how to animate it with hybrid approach. There are some options to animate with dots itself but it's even more experimental than ECS and involves lots of work. So I prefer waiting on the proper dots animation package.
@MarekNijaki
@MarekNijaki 2 жыл бұрын
Up
@doismilho
@doismilho Жыл бұрын
why do you speak english like you're reading the words while speaking french? it's honestly very difficult to understand. I'm brazillian, by the way. Et je parle français aussi, c'est ma troisième langue. still, I had a hard time focusing on whatever you are saying. you should work on your pronunciation, either speak english or french! lol either way thanks for the content, this was very helpful to me.
@WAYNGames
@WAYNGames Жыл бұрын
Probably because I'm French 🤣. Hopefully it will get better with time. There are English and French subtitles on all videos if you have a hard time with my accent 😉.
@doismilho
@doismilho Жыл бұрын
@@WAYNGames sure, but I try to speak english with the english accent, not the brazillian pronunciation of sillabes and letters, you know. you ARE speaking french, just reading english words. I feel like french people do that more than other people.. also it's not like you're bad at english, in fact just the opposite! you clearly know more english than half the US population, I'd bet. xD
@WAYNGames
@WAYNGames Жыл бұрын
I'll do my best to improve this point, thanks for the honest feedback 😀
@midomen100
@midomen100 Жыл бұрын
love to the le france napoleon bonaparte le baguette brother from your deutscher nachbar ja ja ! Nur liebe only love to us European brothers
@midomen100
@midomen100 Жыл бұрын
@@doismilho If you can speak German with a German accent i will speak english with a english accent. You gotta watch a native english speaker if its so hard for you to understand. I understand him well and french guys have their own ways its nothing he should change.
How to Animate in Unity DOTS 1.0 - Hybrid Workflow
8:50
WAYN Games
Рет қаралды 14 М.
How to use Aspects in Unity ECS 1.0 ? - ALL SECRETS REVEALED
8:04
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Move Entity With Input System Using Unity ECS (DOTS)
10:09
Developers Hub
Рет қаралды 5 М.
I Paid Fiverr Game Developers to Make the Same Game
10:25
BadGameDev
Рет қаралды 751 М.
What are BlobAssets ? How to use them ?
8:02
WAYN Games
Рет қаралды 3 М.
How far can we PUSH Unity? Game Objects vs Entities
6:55
GameDev Blueprint
Рет қаралды 12 М.
Learn how the new baking workflow works with Unity ECS 1.0
8:01
🎈🎈🎈😲 #tiktok #shorts
0:28
Byungari 병아리언니
Рет қаралды 4,5 МЛН