- Frequently Asked Questions (FAQ)
- Questions
- Why does the plugin fail to work after changing configuration?
- How do I override sandbox or deployment IDs when publishing on the Epic Games Store?
- How do I get the Epic Username?
- Can a title pass a custom device ID? How does one do that?
- Are there alternatives to storing the config files in Streaming Assets? Why is the file there?
- Why does the Demo Scene fail to load?
- What is the correct way to log into the Epic Games Store?
- Do I or my players need an Epic Games Account?
- What does the "DllNotFoundException" error mean?
- Why am I getting Overlay Errors?
- Missing Native Libraries?
- How do I debug the native DLL?
- How do I disable the Overlay?
To rerun in UnityEditor without rebooting, we must reload the EOS SDK dll between runs.
To find out why and how to do so look see our documentation on Unity Specific aspects of implementing EOS.
This functionality is outlined in our document on the Epic Game Store.
It depends on what one means by "Username".
If one means a name that's displayable to the user, a.k.a. a display name, then the following code should suffice, assuming one has already logged in:
var userInfoManager = EOSManager.Instance.GetOrCreateManager<EOSUserInfoManager>();
var userInfo = userInfoManager.GetLocalUserInfo();
if (UserInfo.UserId?.IsValid() == true)
{
DisplayNameText.text = UserInfo.DisplayName;
}
However, if one means "Epic username that's passed to the app via the Epic Launcher", there is a method in
EOSManager
that one may use.
var epicLauncherArgs = EOSManager.instance.GetCommandLineArgsFromEpicLauncher()
string epicUsername = epicLauncherArgs.epicUsername;
This will get whatever username is passed on the command line from Epic.
A title can pass a custom device ID, but must be sure that the ID is unique to the device.
For example, assuming CoolMethodThatCreatesAUniqueDeviceID
is method that the title has written to generate
a unique string that can identify the device:
private void CreateCustomDeviceID()
{
var connectInterface = EOSManager.Instance.GetEOSConnectInterface();
var options = new Epic.OnlineServices.Connect.CreateDeviceIdOptions()
{
DeviceModel = CoolMethodThatCreatesAUniqueDeviceID()
};
connectInterface.CreateDeviceId(ref options, null, CreateDeviceCallback);
}
More specific information can be found in Epic's documentation.
Quick summary: Those values are not as 'secret' as one might assume, and it's somewhat safe to have them in the open.
The config file has to be in StreamingAssets so that the GfxPluginNativeRender can access the values in it before all of Unity has been bootstrapped so that the Plugin can hook all the appropriate things before the first graphics call by the Unity engine.
Note
See eos_config_security.md for more information.
There is a standard sample pack, and several extra packs in the EOS Unity Plugin. If a scene doesn't load, remember to import the wanted extra pack. Additionally, make sure all wanted sample scenes are included in the build settings as shown in steps 4.-6. of Importing the samples.
The correct way to connect to the Epic Games Store through your application would be to use the exchange code login method:
Exchange Code
login could be used when launching the game through Epic Games Launcher on desktop platforms (Windows, Mac, Linux)
The required exchange code could be retrieved with GetCommandLineArgsFromEpicLauncher()
EOSManager.Instance.StartLoginWithLoginTypeAndToken(
loginType,
null, // Intended for UserID, but is unused for Exchange Code login
EOSManager.Instance.GetCommandLineArgsFromEpicLauncher().authPassword, // The exchange code itself, passed as login token
StartLoginWithLoginTypeAndTokenCallback);
As a developer you will need to have an Epic Games account in order to interact with the EOS Developer Portal and manage your product.
Players are given multiple login options, which are slightly different from platform to platform. Details of which login methods are supported by each platform are listed in our documentation outlining login type by platform.
This might be caused by libraries/binaries not being fetched from git lfs.
Which mainly happens when adding the UPM via git url
To fix this you may do one of the following:
- Initialize git lfs on the package folder (from a command window
git lfs install
). - Add the UPM
via tarball
downloaded the releases on GitHub instead.
Overlay errors are most likely due to not having the overlay installed, this is done in two steps:
- Install the Epic Games Store application.
- Run the
EOSBootstrapper.exe
that is generated with a build before running the application.
Some native functionality are required for platform specific needs.
To get these dependent libraries, use the platform library build tool in the plugin at EOS Plugin > Advanced > Build Library > [Target Platform]
Or to install the libraries manually, go to the lib/NativeCode
folder, find the target platform, and build the .sln
or run the makefile
in the folder.
- Get code for the eos samples.
- Set build configuration to
Debug
- Set
SHOW_DIALOG_BOX_ON_WARN
to1
. - Build the Visual Studio project.
- Copy the DLL to a version of the exported project to debug.
- After launch, attach to the project after the dialog box appears.
On the EOS Configuration Editor Window there is a setting for Platform Flags
. By adding DisableOverlay
to your list of Platform Flags, the Epic Overlay will not be initialized during runtime. When this is configured the EOSBootstrapper.exe
will not be included in Windows builds.
See PlatformFlags.cs