Announcement

Collapse
No announcement yet.

What am I missing here? UFUNCTION(exec), console function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Right, it says so on the exec keyword documenation page but no mention of which classes those are. I now remember it was like this with UE3 aswell. Thanks James!

    Leave a comment:


  • replied
    Only certain classes can contain 'exec' functions. I'm afraid I can't find a full list right now, but I know Pawn, PlayerController, CheatManager, GameMode, PlayerInput & HUD are some of them.

    Leave a comment:


  • What am I missing here? UFUNCTION(exec), console function

    Hey,

    I just want to mark a function as exec so I can write the function name in the console and have some code executing for testing purposes.
    In UnrealScript you just wrote "exec function ...".
    Now I understand I have to mark my function in the header via
    UFUNCTION(exec)

    So what I did was this:
    - Header file:
    Code:
    UFUNCTION(exec)
    		void TestFunc(bool value);
    - Main file:
    Code:
    void AShooterWeapon::TestFunc(bool value)
    {
    	..do smth with "value"..
    
    }
    So the function "TestFunc" shows up in console but it says it cannot find the function... What am I missing?
    Last edited by Saiboat; 04-14-2014, 10:04 AM.
Working...
X