Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code generation fix #47

Open
wants to merge 11 commits into
base: ue-5.1
Choose a base branch
from

Conversation

laughxing
Copy link
Collaborator

No description provided.

@laughxing laughxing requested a review from Augkit June 19, 2023 03:48
const FString ValueStr = GetCode_GetPropertyValueFrom(TargetInstance);
const FString FieldValueStr = GetCode_GetProtoFieldValueFrom(NewStateName);
const FNumericProperty* NumericProperty = Cast<FNumericProperty>(OriginalProperty);
if (NumericProperty && NumericProperty->IsEnum())
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend overriding GetCode_GetPropertyValueFrom by inheriting PropertyDecoratory.

  1. Perform the following operations under /Source/ReplicatorGenerator/<Public|Private>/PropertyDecoratory directory.
  2. Create BoolPropertyDecoratory.<h|.cpp> and EnumPropertyDecoratory.<h|.cpp>, and override GetCode_GetPropertyValueFrom.
  3. Change BASE_DATA_TYPE_PROPERTY_DECORATOR_WITH_BUILDER(FBoolPropertyDecoratorBuilder, FBoolPropertyDecorator, FBoolProperty, bool) in BaseDataTypePropertyDecorator.h to BASE_DATA_TYPE_PROPERTY_DECORATOR_BUILDER(FBoolPropertyDecoratorBuilder, FBoolPropertyDecorator, FBoolProperty).
  4. Create EnumPropertyDecoratoryBuilder.<h|.cpp> and rewrite IsSpecialProperty and ConstructPropertyDecorator by referring to VectorPropertyDecoratorBuilder.
  5. Add ->SetNextBuilder(MakeShared<EnumPropertyDecoratoryBuilder>()) after line 18 of FPropertyDecoratorFactory.cpp.

@laughxing laughxing changed the base branch from master to ue-5.1 June 26, 2023 11:35
@laughxing laughxing requested a review from Augkit June 26, 2023 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants