pixeyehq / actors.unity Goto Github PK
View Code? Open in Web Editor NEW🚀Actors is a framework empowering developers to make better games faster on Unity.
License: MIT License
🚀Actors is a framework empowering developers to make better games faster on Unity.
License: MIT License
I expected to read "perform" instead of "perfrom"
I am currently reading "perfrom"
To switch 'o' and 'r' characters positions.
Google Chrome | 84.0.4147.89 (Official Build) (64-bit)
Revision | 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS | macOS Version 10.15.6 (Build 19G73)
You use:
[Il2CppSetOption(Option.NullChecks | Option.ArrayBoundsChecks | Option.DivideByZeroChecks, false)]
but Option is not a bitmask enum, so you just turn off Option.DivideByZeroChecks = 3, because (1 | 2 | 3) will be 3.
To fix this, just replace [Il2CppSetOption(Option.NullChecks | Option.ArrayBoundsChecks | Option.DivideByZeroChecks, false)] to
[Il2CppSetOption(Option.NullChecks, false)]
[Il2CppSetOption(Option.ArrayBoundsChecks, false)]
[Il2CppSetOption(Option.DivideByZeroChecks, false)]
You are welcome ;)
In the past, the only way to stop the observer was removing the entity that held the observer. This is not a good practice as the release of entity is always a delayed operation and in some cases this may lead to unwanted observations before stopping.
Stop method will allow to clean observers instantly.
public T[] component = new T[EngineSettings.MinComponents];
public Y[] component2 = new Y[EngineSettings.MinComponents];
public U[] component3 = new U[EngineSettings.MinComponents];
Storage<T> storage = Storage<T>.Instance;
Storage<Y> storage2 = Storage<Y>.Instance;
Storage<U> storage3 = Storage<U>.Instance;
Переименовать component в component1, storage в storage1
public T[] component1 = new T[EngineSettings.MinComponents];
public Y[] component2 = new Y[EngineSettings.MinComponents];
public U[] component3 = new U[EngineSettings.MinComponents];
Storage<T> storage1 = Storage<T>.Instance;
Storage<Y> storage2 = Storage<Y>.Instance;
Storage<U> storage3 = Storage<U>.Instance;
возможно это личное предпочтение, но при написании кода выглядеть будет лучше
Package.json version of release 2020.04.16 is not updated.
Add ability to receive Add method from the layer implementation.
entites, а не entities. Опечатка или намеренно - не знаю, по-моему опечатка (:
public class Actor : MonoCached, IPoolable
{
public static Actor[] entites = new Actor[EngineSettings.MinEntities];
. . .
}
В Tag.cs:
public static bool Has(this int entityID, int filter) { }
public static bool Has(this int entityID, params int[] filter) { }
public static bool Has(this Actor a, int filter) { }
public static bool Has(this Actor a, params int[] filter) { }
public static bool HasAny(this Actor a, params int[] filter) { }
public static bool HasAny(this int entityID, params int[] filter) { }
изменить название методов расширения на:
public static bool HasTag(this int entityID, int filter) { }
public static bool HasTags(this int entityID, params int[] filter) { }
public static bool HasTag(this Actor a, int filter) { }
public static bool HasTags(this Actor a, params int[] filter) { }
public static bool HasAnyTag(this Actor a, params int[] filter) { }
public static bool HasAnyTags(this int entityID, params int[] filter) { }
P.S. заодно хочу спросить, почему изменился стиль именования этих методов?
Раньше было:
TagHas, TagAdd, TagRemove, и т.д.
Теперь:
HasTag, AddTag, RemoveTag?
Это личное предпочтение или что-то другое?
Hey there,
I was curious as it looks like a lot of work went into this and it really shows, why might someone consider using a framework like this over the official Unity ECS implementation with Burst capability? I had not really thought about it before, is it at all possible for systems other than the official ECS to take advantage of Burst? Is someone able to take advantage of things like multiple separate worlds, Unity's newer physics, the new incarnation of scene serialization and streaming, etc?
Thanks!
-MH
Using ispooled variable in the actor is unsafe and should be redesigned. The problem is only for actors that were put in the scene from the editor. The Poolmanaged doesn't know anything about those prefabs. The framework managed that by caching prefabs before making a build but it won't work for scenes that were not added to the scene manager.
Another solution is to remove entirely editor prefab check and ispooled variable. Instead, add the string name of the prefab in the actor that will be used for getting proper prefab instance id.
Думаю было бы неплохо добавить часть, где объясняется использование компонентов, и что они вообще такое, а так же фабрик на каком-нибудь примере (тот же FactoryPlayer)
В юнити, если parent = null
- то это означает, что объект находится в "корне сцены" (где выше по иерархии - только сама сцена).
Вызывая метод Obj.Create
с parent = null
я предполагаю, что объект просто будет размещен в корне сцены, как если бы я не передавал parent
вообще.
Код реализации метода:
public Transform Create(GameObject prefab, Transform parent, Vector3 startPosition = default,
Quaternion startRotation = default)
{
return GameObject
.Instantiate(prefab, parent.TransformPoint(startPosition), startRotation * parent.rotation, parent)
.transform;
}
Эксепшен из-за startRotation * parent.rotation
, т.к. parent = null
.
Не удобно работать с джобами для перемещения обьектов в параллельности.
Суть: не используется очистка групп от сущностей через фреймворк акторсов, вместо этого через дополнительные проверки пропускаются сущности, которые должны уйти из группы.
вся логика "мучений" подписана в ProcessingJobsMoveDirection ))
после запуска нажимать пробел
issuesActrosJob.zip
When the scene has destroyed all entities on that scene are killed. The components cleanup method for released entities triggers after the scene gets destroyed. This may rewrite the setup of Actors on the next scene.
Стоит дополнить описание процессингов в README-rus.md & README.md, объяснив посылку сигнала:
"...каждый раз когда вы используете ProcessingSignals.Default.SendSignal(new ваштипсигнала); он отправит этот сигнал всем подписанным экземплярам с IRecieve<ваштипсигнала>"
Что-то на подобии.
P.S: мой первый Issue :D
Hi, after adding adding dependency via UPM, bunch of errors pop up:
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/Drawers/DrawerScene.cs(22,31): error CS0246: The type or namespace name 'SceneReference' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/Drawers/DrawerInfoBox.cs(10,34): error CS0246: The type or namespace name 'InfoBoxAttribute' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/Drawers/DrawerScene.cs(22,31): error CS0246: The type or namespace name 'SceneReference' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/Drawers/DrawerTags.cs(14,31): error CS0246: The type or namespace name 'TagFilterAttribute' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/Drawers/DrawerTags.cs(22,10): error CS0246: The type or namespace name 'FastString' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/SceneProcessors/PostHandlePools.cs(66,70): error CS0246: The type or namespace name 'Starter' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/Inspector/InspectorOverride.cs(279,11): error CS0246: The type or namespace name 'FoldoutGroupAttribute' could not be found (are you missing a using directive or an assembly reference?)
Library/PackageCache/com.pixeye.ecs@b0136155b5/Editor/Inspector/InspectorReordarable.cs(439,41): error CS0246: The type or namespace name 'ReorderableAttribute' could not be found (are you missing a using directive or an assembly reference?)
The code below will download a sub-scene in 1 frame even if the scene is big, ignoring async callbacks of the framework.
public class LayerTerrain : Layer<LayerTerrain>
{
protected override void Setup()
{
SceneSub.Add("Scene Game");
}
Possible solutions:
public class LayerTerrain : Layer<LayerTerrain>
{
protected override void Setup()
{
// Using `WaitFor` framework method to perform delay.
WaitFor(Time.deltaTime, delegate { SceneSub.Add("Scene Game"); });
}
}
You may leave thoughts on why this code behaves like this. 👍
Создаем в реалтайме сложный объект с акторами и монокешами. Используя методы Obj.Init
или Obj.InitChilds
инициализируем все акторы и монокеши. Но монокеш может инициализироваться самостоятельно (в Start()
) из-за чего возможна следующая ситуация:
(Именно в такой последовательности)
Bootstrap -> Setup()
Start -> Setup()
В результате получается 2 вызова Setup.
Текущая реализация самостоятельной инициализации монокеша:
protected virtual void Start()
{
if (!LayerKernel.InstanceInternal || !LayerKernel.Initialized[gameObject.scene.buildIndex]) return;
Layer = LayerKernel.Layers[gameObject.scene.buildIndex];
Setup();
}
protected virtual void Start()
{
if (!LayerKernel.InstanceInternal || !LayerKernel.Initialized[gameObject.scene.buildIndex]) return;
if (Layer != null) return;
Layer = LayerKernel.Layers[gameObject.scene.buildIndex];
Setup();
}
В монокеше происходила подписка на изменение стейта стройки. Как только стройка заканчивалась - ставилась стена.
Из-за двойного вызова Setup
происходила двойная подписка на изменение стейта, из-за чего строилось 2 стены, а не одна.
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.