Sec 03 について
概要
- What is Gameplay Ability System: GAS?
- Built for Paragon but cancelled
- Best for RPGs
- Attach Ability System to Characters
- It is possible to attach systems to Actor or Actor assosiated Class
- In this course, we will attach to both for studying
- It is possible to attach systems to Actor or Actor assosiated Class
- Setup GAS
- Enable Plugin in Plugin Setting and Build.cs
- Create Ability System Component both on base-enemy and playerstate
- create default object for both abilitySystem and AttributeSet, and set replicated for AbilitySystem
- Impliment IAbilitySystemInterface on both characterbase and playerstate
- Question Why IAbilitySystemInterface? Why not normal getter?? Answer This is discribed in here
- Set player state belonging to controlled player
Distinguish Owner Actor and Avatar Actor. For example, Aura enemy is both owner and avatar, player state is owner, controlled character is avatar.
1. Consider server side and client side
- detail will be inplemented in other lec
void AAuraCharacter::InitAbilityActorInfo()
{
* AuraPlayerState = GetPlayerState<AAuraPlayerState>();
AAuraPlayerState(AuraPlayerState);
check->GetAbilitySystemComponent()->InitAbilityActorInfo(AuraPlayerState, this);
AuraPlayerState
= AuraPlayerState->GetAbilitySystemComponent();
AbilitySystemComponent = AuraPlayerState->GetAttributeSet();
AttributeSet }
void AAuraCharacter::PossessedBy(AController* NewController)
{
::PossessedBy(NewController);
Super
// Init ability system component for the server
();
InitAbilityActorInfo}
void AAuraCharacter::OnRep_PlayerState()
{
::OnRep_PlayerState();
Super
// Init ability system component for the client
();
InitAbilityActorInfo}
発見
C++のディレクトリ構成を変更する際
- マジで面倒なので出来ればやらないこと。
- BinaryとIntermediateは消して、直接ディレクトリを編集する
- ビルドしなおす。ただRiderでエディタを開いてもコンパイルエラーが出る
- Epic Game Launcherから直接開く
- Refresh Rider Projectを実行する
iCloudでの作業
やめた方が良い。
resource fork, Finder information, or similar detritus not allowed
こんなエラーを吐いてくるが、
xattr -cr .
これで解決できない。
Server side と Client side の問題
これについては後でじっくりドキュメントを読む必要がありそうだ。