x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

UE_LOG and AddOnScreenDebugMessage doesn't work in my case

Hi, i made my custom actor based class Steam_Function_actor_based, inside it i made a method UE_RequestLobbyList()

 Steam_Function_actor_based.h
 
 // Fill out your copyright notice in the Description page of Project Settings.
 
 #pragma once
 
 #include "GameFramework/Actor.h"
 #include "Steam_Function_actor_based.generated.h"
 
 UCLASS()
 class STEAM_TRAINING_API ASteam_Function_actor_based : public AActor
 {
 GENERATED_BODY()
 
 public:    
 // Sets default values for this actor's properties
 ASteam_Function_actor_based();
 
 // Called when the game starts or when spawned
 virtual void BeginPlay() override;
 
 // Called every frame
 virtual void Tick( float DeltaSeconds ) override;
 
 UFUNCTION(BlueprintCallable, Category = "Steam")
 void UE_RequestLobbyList();
 
 };

and made method body in Steam_Function_actor_based.cpp

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #include "steam_training.h"
 #include "Steam_Function_actor_based.h"
 #include "steam_api.h"
 
 #pragma comment(lib, "steam_api64.lib")
 
 void ASteam_Function_actor_based::UE_RequestLobbyList()
 {
 UE_LOG(LogTemp, Warning, TEXT("hSteamAPICall"));
 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("hSteamAPICall"));
 
 SteamAPICall_t hSteamAPICall = SteamMatchmaking()->RequestLobbyList();
 //SteamAPI_SetMiniDumpComment("Minidump comment: SteamworksExample.exe\n");
 //SteamAPI_WriteMiniDump(1, 0, 0);
 
 UE_LOG(LogTemp, Warning, TEXT("hSteamAPICall is %d"), hSteamAPICall);
 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, FString::Printf(TEXT("hSteamAPICall is %d"), hSteamAPICall));
 }

so when i call my method from blueprint, execution lines show method called https://yadi.sk/i/U1bZIsPfgSD9J , but no onscreen message and no log message, why? i also tryed call my method in other way - by casting after jump and casting fail (target variable just empty)

to be clear, i use 4.7.6 UE version

investigated interesting thing - Print String from blueprints work fine, but

 UE_LOG(LogTemp, Warning, TEXT("hSteamAPICall"));
 GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Red, TEXT("hSteamAPICall"));

from my custom method won't at all, but i call Print String after my method in blueprint graph

https://yadi.sk/i/QzwY9Lw3gSLUu

Product Version: Not Selected
Tags:
more ▼

asked May 05 '15 at 01:59 PM in C++ Programming

avatar image

happyhorror
576 53 46 72

avatar image Shadowriver May 05 '15 at 03:08 PM

You are aware that UE4 has a common interface to support variues online services under same APIs (called OnlineSubsystem) and has SteamWorks support ready?

https://docs.unrealengine.com/latest/INT/Programming/Online/index.html https://docs.unrealengine.com/latest/INT/Programming/Online/Steam/index.html https://docs.unrealengine.com/latest/INT/API/Runtime/OnlineSubsystem/index.html

avatar image happyhorror May 05 '15 at 03:43 PM

ty, seems i miss this one

avatar image happyhorror May 05 '15 at 03:18 PM

futher investigation lead me to https://www.youtube.com/watch?t=1543&v=t-7JYG9rvWM, i added

DEFINE_LOG_CATEGORY(MyLog); //into my class .cpp

also added

DECLARE_LOG_CATEGORY_EXTERN(MyLog, Log, All); //into my class .h

made blueprint built from my class actor and added that new blueprint into blueprint SideScrollerCharacter that drive your character by default

after debug -> run new instance in VS i could get in output log my message

MyLog:Warning: hSteamAPICall****

and seems it appeared on screen, but i also got back return bool value and error

LogVoice:Warning: Failed to initialize voice interface LogScript:Warning: Accessed None 'target' SideScrollerExampleMap_C /Game/SideScrollerBP/Maps/UEDPIE_0_SideScrollerExampleMap.SideScrollerExampleMap:PersistentLevel.SideScrollerExampleMap_C_2 Function /Game/SideScrollerBP/Maps/SideScrollerExampleMap.SideScrollerExampleMap_C:ExecuteUbergraph_SideScrollerExampleMap:001F PIE:Error: Error Accessed None 'target' from node Event Begin Play in blueprint SideScrollerExampleMap

so do you have any idea why this PIE:Error: happen?

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

checked one more thing, seems there's no need in MyLog category, but! to work UE editor must be run as debugging new instance right in VS, don't know how it affect UE editor, but after this logs started working!

more ▼

answered May 05 '15 at 03:25 PM

avatar image

happyhorror
576 53 46 72

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question