Comments (8)
Thanks that is correct now!
from gsdk.
thank you!
from gsdk.
Welcome! Sorry but I tried a couple of times but can't get the code indicators in the sample above working. It's probably easier to read it in original post on Unity SDK.
from gsdk.
I think I fixed that, let me know if code looks like intended now.
from gsdk.
Coming back to this, want to make a pull request on this repo adding the DontDestroyOnLoad
method? We'd be more than happy to review, discuss and accept!
from gsdk.
Sorry as I mentioned before I just don't have the time currently to setup GIT and do all the required steps.
from gsdk.
I'd go a bit further and suggest a singleton approach since depending on the scenes setup a scenechange might result in multiple Object getting created. Thus i'd suggest to add these following changes instead:
public class PlayFabMultiplayerAgentView : MonoBehaviour
{
/// <summary>
/// Static reference to the current active instance of the PlayFabMultiplayerAgentView.
/// </summary>
public static PlayFabMultiplayerAgentView current;
private float _timer;
/// <summary>
/// Awake constructor
/// </summary>
private void Awake()
{
Debug.Log($"{Time.fixedTime} PlayFabMultiplayerAgentView awake ");
// Check if the static instance already contains a refernce:
if (current)
{
// Destroy this instance since we only ever need one PlayFabMultiplayerAgentView
Destroy(gameObject);
return;
}
else
{
// Need to keep this game object alive through scene changes.
DontDestroyOnLoad(this);
current = this;
}
}
/// <summary>
/// Called when gameobject is destroyed
/// </summary>
private void OnDestroy()
{
Debug.Log($"{Time.fixedTime} PlayFabMultiplayerAgentView destroyed ");
}
}
from gsdk.
I believe we can close this due to #52, thanks @MScottAdams for bringing this up and @CaptainPineapple for the PR!
from gsdk.
Related Issues (20)
- Support for ue4 .24 HOT 18
- Unreal Engine GSDK plugin memory leak in StandingBy HOT 19
- Possible player crash because of GSDK HOT 13
- Are there any plans for Go-GSDK next? HOT 5
- Does not work with unreal engine 4.26 source HOT 13
- Missing blueprint UE4.27.2 Source and problem with plugins build HOT 20
- UE5.0 Source Code build cannot find plugin HOT 6
- Request to disable heartbeats/plugin functionality with a variable. HOT 7
- Inconsistent names in UE plugin
- Your device has been exposed to a micro bug and may be at risk
- Failed to parse heartbeat - Stuck in Active state HOT 18
- UE 5.1.1 "Heartbeat endpoint and Server id are required configuration values" HOT 16
- Unreal: FGSDKInternal::SendHeartbeat() may crash after the engine's shutdown phase because the HTTP module is unloaded HOT 1
- Add Versioning to UE module
- azure_007 HOT 1
- VMId not being updated from environmental variable HOT 2
- Issue with GSDK_CPP_Windows.lib (or libculr.dll not sure) on Unreal Engine 5.3 project compilation HOT 23
- Replace Flush call to support UE5.3
- Unreachable Code during compilation for UE 5.4.1 HOT 1
- Unreal Engine Source 5.3.2 compiling server build problem HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gsdk.