Xamarin Studio 5.7.x currently has a bug when find-replace (Menu -> Search -> Replace in files...) https://bugzilla.xamarin.com/show_bug.cgi?id=25360
Please be aware of that issue and use any other text editor for that task.
Entitas 0.12.0 generates prefixed matchers based on the PoolAttribute and introduces some API changes. In your existing project with a Entitas version < 0.12.0 manually rename the following classes and methods.
pool.CreateSystem() -> pool.CreateExecuteSystem()
Now that you're prepared for integrating the latest version, delete your existing version of Entitas, EntitasCodeGenerator and EntitasUnity.
Entitas
EntitasCodeGenerator
EntitasUnity
Open the Unity preference panel and select Entitas. Check and update the path to the folder where
the code generator will save all generated files. If you are using the PoolAttribute in your components,
add all custom pool names used in your application. Make sure that all existing custom PoolAttributes call
the base constructor with the same name as the class (without 'Attribute').
If you are not using the PoolAttribute in your components, you can skip this process.
using Entitas.CodeGenerator;
public class CoreGameAttribute : PoolAttribute {
public CoreGameAttribute() : base("CoreGame") {
}
}Use the code generator and generate
Click the MenuItem "Entitas/Update API". All occurrences of the old Matcher will be updated
to the new version, which is prefixed based on the PoolAttribute.
Delete all custom PoolAttributes
Beside features, Entitas 0.10.0 includes lots of renaming. If your current Entitas version is < 0.10.0, you might want to follow the next few simple renaming steps, to speed up the integration of the latest version of Entitas. In your existing project with a Entitas version < 0.10.0 manually rename the following classes and methods.
EntityRepository -> Pool
EntityRepository.GetCollection() -> Pool.GetGroup()
EntityCollection -> Group
EntityCollection.EntityCollectionChange -> Group.GroupChanged
EntityRepositoryObserver -> GroupObserver
EntityRepositoryObserver.EntityCollectionEventType -> GroupObserver.GroupEventType
IEntityMatcher -> IMatcher
IEntitySystem -> IExecuteSystem
AllOfEntityMatcher -> AllOfMatcher
EntityRepositoryAttribute -> PoolAttribute
IReactiveSubEntitySystem -> IReactiveSystem
ReactiveEntitySystem -> ReactiveSystem
EntityWillBeRemovedEntityRepositoryObserver -> DELETE
IReactiveSubEntityWillBeRemovedSystem -> DELETE
ReactiveEntityWillBeRemovedSystem -> DELETE
Now that you're prepared for integrating the latest version, delete your existing version of Entitas, EntitasCodeGenerator and ToolKit.
Entitas
EntitasCodeGenerator
ToolKit (unless you use classes from ToolKit. The new version of Entitas doesn't depend on ToolKit anymore)
IReactiveSubEntityWillBeRemovedSystem
- Consider implementing ISystem & ISetPool and use group.OnEntityWillBeRemoved += foobar;
Use the code generator and generate