Actors.unity Versions Save

πŸš€Actors is a framework empowering developers to make better games faster on Unity.

2020.02.19

4 years ago

Minor bug fixes.

Known issues: *If you created an actor or entity and didn't set a component to it, AddGet method won't work as intended.

//Example
var e = Entity.Create();
Timer.Add(1f, ()=>e.AddGet<ComponentTest>()); //ComponentTest won't be added

//Example of working code:
var e = Entity.Create();
e.Set<ComponentTest1>();
Timer.Add(1f, ()=> e.AddGet<ComponentTest2>());

2019.12.31

4 years ago

2019.12.10

4 years ago

Fixes:

  • Scene management

2019.12.07

4 years ago

Fixed minor bugs

2019.12.06

4 years ago

New

  • Unity packages bundles with ACTORS & empty setup

Fixed

  • Console time fixed in Unity packages bundles
  • minor bugs

2019.10.11

4 years ago

Changes

  • Time->time

Fixes

  • scenes without dependencies load correctly
  • static or predefined groups after reloading scene work correctly

Added

Custom coroutines


void run(){
       routines.run(move());             // local coroutines that dies if scene get removed
       routines.app.run(move());      // global coroutines that live out of the scene scope
}

 IEnumerator move()
        {

            yield return routines.wait(1f);
            yield return routines.waitFrame;

        }

Group binders

Eliminate the need for making global static groups.

	        [Bind(tag.importantGroup)]   // use Bind with int ID to register group in cache
		private Group<ComponentTest> TestGroup;
        // retrieve your group by ID somewhere in the code.
	var gr = ent.groups[tag.importantGroup];

Custom Debug

Safely use this method everywhere. It won't be used in the release mode of ACTORS.

  debug.log("your_debug");

2019.10.1

4 years ago

#fixes

  • ent.Exist(); method works correctly.
  • minor bug fixes

2019.9.28

4 years ago

The info about the changes will be soon.

2019.9.21

4 years ago

2019.9.15a

4 years ago

ENG Breaking changes & Improvements:

  • The boilerplate code for components transferred from
	static partial class Components
	{
		public const string Health = "Pixeye.Source.ComponentHealth";

		[RuntimeInitializeOnLoadMethod]
		static void ComponentHealthInit() => new SComponentHealth();

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		internal static ref ComponentHealth ComponentHealth(in this ent entity)
			=> ref Storage<ComponentHealth>.components[entity.id];

		internal class SComponentHealth : Storage<ComponentHealth>.Setup
		{
			public override ComponentHealth Create() => new ComponentHealth();
			public override void Dispose(int[] id, int len)
			{
				for (int i = 0; i < len; i++)
				{
					ref var component = ref components[id[i]];
					component.val    = 0;
					component.valMax = 0;
				}
			}
		}
	}

to

static partial class component
	{
		public const string health = "Pixeye.Source.ComponentHealth";

		public static ref ComponentHealth ComponentHealth(in this ent entity)
			=> ref StorageComponentHealth.components[entity.id];
	}

	sealed class StorageComponentHealth : Storage<ComponentHealth>
	{
		public override ComponentHealth Create() => new ComponentHealth();
		public override void Dispose()
		{
			for (int i = 0; i < disposedLen; i++)
			{
				ref var component = ref components[disposed[i]];
				component.val = 0;
				component.valMax = 0;
			}
		}
	}
  • [GroupWantEvent] attribute changed to [WantEvent]

  • [GroupExclude] attribute changed to [Exclude]

  • You can gain slightly better performance at project initialization by defining a namespace you use for your components in the framework settings file. ```SettingsFramework.json````

{
  "SizeEntities": 1024, // initial size of entity arrays
  "SizeComponents": 256, // how many components can be registered
  "SizeGenerations": 4, // you don't need to change anything
  "SizeProcessors": 64, // how many processors you want
  "DataNamespace": "Pixeye.Source" // define Assembly Definition that you use in your components. (optional)
}

RU ИзмСнСния ΠΈ ΡƒΠ»ΡƒΡ‡ΡˆΠ΅Π½ΠΈΡ

  • НастроСчный ΠΊΠΎΠ΄ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ с
	static partial class Components
	{
		public const string Health = "Pixeye.Source.ComponentHealth";

		[RuntimeInitializeOnLoadMethod]
		static void ComponentHealthInit() => new SComponentHealth();

		[MethodImpl(MethodImplOptions.AggressiveInlining)]
		internal static ref ComponentHealth ComponentHealth(in this ent entity)
			=> ref Storage<ComponentHealth>.components[entity.id];

		internal class SComponentHealth : Storage<ComponentHealth>.Setup
		{
			public override ComponentHealth Create() => new ComponentHealth();
			public override void Dispose(int[] id, int len)
			{
				for (int i = 0; i < len; i++)
				{
					ref var component = ref components[id[i]];
					component.val    = 0;
					component.valMax = 0;
				}
			}
		}
	}

Π½Π°

static partial class component
	{
		public const string health = "Pixeye.Source.ComponentHealth";

		public static ref ComponentHealth ComponentHealth(in this ent entity)
			=> ref StorageComponentHealth.components[entity.id];
	}

	sealed class StorageComponentHealth : Storage<ComponentHealth>
	{
		public override ComponentHealth Create() => new ComponentHealth();
		public override void Dispose()
		{
			for (int i = 0; i < disposedLen; i++)
			{
				ref var component = ref components[disposed[i]];
				component.val = 0;
				component.valMax = 0;
			}
		}
	}
  • [GroupWantEvent] Π°Ρ‚Ρ€ΠΈΠ±ΡƒΡ‚ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ Π½Π° [WantEvent]

  • [GroupExclude] Π°Ρ‚Ρ€ΠΈΠ±ΡƒΡ‚ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ Π½Π° [Exclude]

  • Π˜Π½ΠΈΡ†ΠΈΠ°Π»ΠΈΠ·Π°Ρ†ΠΈΡŽ ΠΏΡ€ΠΎΠ΅ΠΊΡ‚Π° Π½Π° стартС ΠΌΠΎΠΆΠ½ΠΎ ΡƒΡΠΊΠΎΡ€ΠΈΡ‚ΡŒ настроив Ρ„Π°ΠΉΠ» ```SettingsFramework.json```` ( находится Π² рСсурсах, Ссли Π½Π΅Ρ‚ Ρ‚ΠΎ создайтС Π²Ρ€ΡƒΡ‡Π½ΡƒΡŽ )

{
  "SizeEntities": 1024, // стартовоС ΠΊΠΎΠ»-Π²ΠΎ сущностСй
  "SizeComponents": 256, // ΠΊΠΎΠ»-Π²ΠΎ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ΠΎΠ²
  "SizeGenerations": 4, // ΠΊΠΎΠ»-Π²ΠΎ ΠΏΠΎΠΊΠΎΠ»Π΅Π½ΠΈΠΉ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚ΠΎΠ² ( скорСС всС Π²Π°ΠΌ нСпонадобится это ΠΌΠ΅Π½ΡΡ‚ΡŒ )
  "SizeProcessors": 64,  // ΠΊΠΎΠ»-Π²ΠΎ процСссоров
  "DataNamespace": "Pixeye.Source" // НазваниС Assembly Definition Π±ΠΈΠ±Π»ΠΈΠΎΡ‚Π΅ΠΊΠΈ Π² ΠΊΠΎΡ‚ΠΎΡ€ΠΎΠΉ Π»Π΅ΠΆΠ°Ρ‚ ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½Ρ‚Ρ‹
}