Unreal Engine: Difference between revisions

From Andreida
No edit summary
Line 20: Line 20:
GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Blue, TEXT("AFPSCharacter is being used") );
GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Blue, TEXT("AFPSCharacter is being used") );
}
}

<pre>
bool log(FString sText) const;

bool
AYourActor::log(FString sText) const
{
if (GEngine)
{
GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Blue, sText);
return true;
}
else
return false;
}
</pre>


= Misc =
= Misc =

Revision as of 17:32, 9 March 2016

Currently using UE4 (4.10.4)

Links

Blender

C++

Variable names

If you want to use real variable names but have nice names in the UE editor too, then use meta/DisplayName

UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, Meta = (DisplayName = "First Person Camera Component") )
    UCameraComponent* m_pFirstPersonCameraComponent;

Logging

In game output of your logging, like chat text:

if (GEngine)
{
     GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Blue, TEXT("AFPSCharacter is being used") );
}
bool log(FString sText) const;

bool 
AYourActor::log(FString sText) const
{
	if (GEngine)
	{
		GEngine->AddOnScreenDebugMessage(-1, 5, FColor::Blue, sText);
		return true;
	}
	else
		return false;
}

Misc

Source control

The minimum you have to put under source control:

/Config
/Content
/Source
Project.uproject