How to create a player character #123
-
First off, this is a great plugin! And I got the examples going with no problem, yay! Now I am trying to create a basic UE project with a player character created in c# instead of c++. But I am unable to figure out how. Normally with c++ I can create a Blueprint class with my c++ class as parent and then assign that blueprint as DefaultPawnClass in my GameMode. But my C# class needs to inherit from my blueprint and UE doesn't know about any of my C# classes. There isnt't a GameMode version in C#. This seems so basic, so I feel like I must be doing something wrong here: how would you create a, say, FPS using CLR only? class MyCharacter : Character
{
public MyCharacter() : base("myactor", Blueprint.Load("Blueprint'/Game/things/NewBlueprint.NewBlueprint'"))
{
Debug.AddOnScreenMessage(-1, 10.0f, Color.DeepPink, "Hello, Unreal Engine2!");
}
public void Print()
{
Debug.AddOnScreenMessage(-1, 10.0f, Color.DeepPink, "Hello, Unreal Engine3!");
}
} public static class Main
{
public static void OnWorldBegin()
{
//Debug.AddOnScreenMessage(-1, 10.0f, Color.DeepPink, "Hello, Unreal Engine1!");
MyCharacter c = new MyCharacter();
c.Print();
} Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The path to the blueprint is incorrect, it should be just
This API is not exposed yet, please, see the roadmap. |
Beta Was this translation helpful? Give feedback.
The path to the blueprint is incorrect, it should be just
Blueprint.Load("/Game/things/NewBlueprint")
.This API is not exposed yet, please, see the roadmap.