Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "ThirdParty/Steamworks/Steamv132/sdk/public/steam/steam_api.h"
- #include "Engine/GameInstance.h"
- #include "MusicalRangeInstance.generated.h"
- /**
- *
- */
- UCLASS()
- class MUSICALRANGE_API UMusicalRangeInstance : public UGameInstance
- {
- GENERATED_BODY()
- private:
- public:
- /* test the functionality of the Game Instance */
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Game Instance")
- int32 InterLevelPersitentValue;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Steamworks")
- bool IsSteamOverlayActive;
- UFUNCTION(BlueprintCallable, category = "Game Instance")
- bool InterLevelPersitentValuePONE();
- /*
- * Must be called every frame so callbacks can be received
- * Always Return True!
- */
- UFUNCTION(BlueprintCallable, category = "Steamworks")
- bool RunSteamCallbacks();
- UFUNCTION(BlueprintImplementableEvent, Category = "Steamworks")
- void OnSteamOverlayIsActive(bool isOverlayActive);
- void SteamOverlayActive();
- void OnSteamOverlayEnabled(GameOverlayActivated_t *pResult, bool bIOFailure);
- CCallResult<UMusicalRangeInstance, GameOverlayActivated_t> m_callResultGameOverlayActive;
- };
- /*
- *
- */
- class FSteamworksCallbackAsync
- {
- private:
- STEAM_CALLBACK(FSteamworksCallbackAsync, OnSteamOverlayActive, GameOverlayActivated_t, OnSteamOverlayActiveCallback);
- UMusicalRangeInstance *MusicalRangeGameInstance;
- public:
- FSteamworksCallbackAsync() :
- OnSteamOverlayActiveCallback(this, &FSteamworksCallbackAsync::OnSteamOverlayActive)
- {
- if (GEngine->GetWorld() != nullptr && GEngine->GetWorld()->GetGameInstance() != nullptr)
- {
- MusicalRangeGameInstance = Cast<UMusicalRangeInstance>(GEngine->GetWorld()->GetGameInstance());
- }
- }
- ~FSteamworksCallbackAsync() {
- }
- };
Add Comment
Please, Sign In to add comment