Page 2 of 2

Re: C# Entity Component System

Posted: Thu Jul 13, 2017 7:36 am
by yiannis128
Sorry for the late reply but is this how you use Entity.GetOrAddComponent<>() ?

Code: Select all

public Player() { PlayerMovement CPlayerMovement = Entity.GetOrCreateComponent<PlayerMovement>(); }

Re: C# Entity Component System

Posted: Sat Jul 15, 2017 7:03 am
by cry-miron
Yes, that should work.

Re: C# Entity Component System

Posted: Thu Jul 20, 2017 5:24 pm
by yiannis128
Well I think it may be a 5.3.4 bug but the added component won't work.