Skip to content

Commit

Permalink
chore: source code and .gitattribute for 1.0.0 UPM release
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-hirata-playeveryware committed Aug 17, 2021
0 parents commit fa892b6
Show file tree
Hide file tree
Showing 1,862 changed files with 186,817 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.cs diff=csharp text eol=lf
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
*.physicsMaterial2D merge=unityyamlmerge eol=lf
*.physicMaterial merge=unityyamlmerge eol=lf
*.asset merge=unityyamlmerge eol=lf
*.meta merge=unityyamlmerge eol=lf
*.controller merge=unityyamlmerge eol=lf
*.dll filter=lfs diff=lfs merge=lfs -text
*.lib filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
4 changes: 4 additions & 0 deletions .sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"displayName": "A displayname",
"description": "A description",
}
197 changes: 197 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
# Changelog
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
### Added
### Changed
### Removed
### Fixed

## [0.0.4-preview] - 2021-07-12

### Added
- feat: enable voice chat interface.
- enable RTC support when using the C# code to init the EOS Platform
- feat: Lobbies RTCRoom
- feat: add 'copy log' button
- feat: implement lobby RTCRoom (voice chat)
- feat: lobbies rtc, implement toggle mute, display IsSpeaking state
- feat: lobbies voice implement remote mute and finish IsTalking
- feat: lobbies implement SetMemberAttribute and MemberAttribute dictionary
- feat: add lobby searchByBucketId functionality
- feat: accept a specific invite in EOSLobbyManager

### Changed
- releases going forward will not have the SHA they were made from. Instead a branch matching the name is used
- Upgrade to EOS SDK 1.13
- log GetAchievementDefinitionCount
- update EOSVersion UI with 'Epic Online Services Plugin For Unity'
- update samples with 'Epic Online Services Plugin For Unity'
- Normalize formatting of C++ files

### Removed
- remove "old" EOS_VERSION_1_12 define

### Fixed
- disable Lobby RTCRoom in Unity editor (crashes)
- correct samples name
- cache UIDebugLog and only show last 100 log entries
- ui toggles corrected to use isOn vs enabled
- ensure that the local user id is set when linking with an external account.
- truncation warnings for Win32 builds
- change dll loading settings so both the x86 and x64 dll aren't loaded at the same time.
- lobby searchByBucketId swap key and value
- handle case where the encryption key is empty
- join lobby via overlay no longer hangs

## [0.0.3-preview+f9188a7876567ff756f68af69b49de049e49fcf5] - 2021-06-22
### Fixed
- Fix copy paste error in EpicOnlineServicesConfigEditor with code generation
- Fix error in IL2CPP resulting from non-existing functions (static libs don't work on windows)

### Added
- feat: enable voice chat interface.
- enable RTC support when using the C# code to init the EOS Platform
- feat: Lobbies RTCRoom
- feat: add 'copy log' button
- feat: implement lobby RTCRoom (voice chat)
- feat: implement lobby RTCRoom (voice chat) [part 2]
- feat: lobbies rtc, implement toggle mute, display IsSpeaking state
- feat: lobbies voice implement remote mute and finish IsTalking
- feat: lobbies implement SetMemberAttribute and MemberAttribute dictionary
- feat: add lobby searchByBucketId functionality
- feat: accept a specific invite in EOSLobbyManager


### Changed
- Upgrade to EOS SDK 1.13
- log GetAchievementDefinitionCount
- update EOSVersion UI with 'Epic Online Services Plugin For Unity'
- update samples with 'Epic Online Services Plugin For Unity'
- Normalize formatting of C++ files

### Removed
- remove "old" EOS_VERSION_1_12 define

### Fixed
- disable Lobby RTCRoom in Unity editor (crashes)
- correct samples name
- cache UIDebugLog and only show last 100 log entries
- ui toggles corrected to use isOn vs enabled
- ensure that the local user id is set when linking with an external account.
- truncation warnings for Win32 builds
- change dll loading settings so both the x86 and x64 dll aren't loaded at the same time.
- lobby searchByBucketId swap key and value
- handle case where the encryption key is empty
- join lobby via overlay no longer hangs

## [0.0.3-preview+f9188a7876567ff756f68af69b49de049e49fcf5] - 2021-06-22
### Fixed
- Fix copy paste error in EpicOnlineServicesConfigEditor with code generation
- Fix error in IL2CPP resulting from non-existing functions (static libs don't work on windows)

## [0.0.2-preview+3ef9b760830941306c28c6a6bcfcf0f53e745be2] - 2021-06-08
### Added
- New platforms
- update to EOS SDK 1.12
- P2P Samples
- Add methods to EOSManager to make it easier to fetch EOS interfaces
- Wrapper class for generating C# friendly Enumerators
- Ability to load EOS Config from a custom DLL on windows

### Changed
- changed namespace callbacks are in for the various login things in the EOSManager
- The various plugin managers have been moved to the Samples directory to make them easier to edit.
- Changed PlayerManager => FriendManager
- UILoginMenu sample now logs in with an explicit call to a Connect Login type
- UIAchievementMenu now dynamically creates all UI (i.e. supports 'unlimited' Achievements to be displayed)
- Update Create Lobbies for 1.12
- LeaderboardManager: Call to get Ranks/UserScores

### Removed
- EOSManager.GetProductIdFromAccountId

### Fixed
- Mitigate chance of hang when calling FreeLibrary in Unity Editor

## [0.0.1-preview+9ac8e3f56aae3afd6cbd36d4b1aa711c6971646b] - 2021-05-14

### Changed
- Fix UI prefabs and apply changes from scene
- Rename EOSPlayerManager -> EOSFriendsManager

- chore: move EOS SDK to another directory to make it easier to move it to it's own assembly.
- chore: rename the asmdef files to match the new branding of PlayEveryWare


## [0.0.1-preview+32890128fb8ae8f36e83ea59e417fcbd036ce37f] - 2021-05-12

### Added
- methods for enumerating various achievement related data.
- method for fetching image as Texture2D for locked and unlocked achievements.

### Removed
- SimpleCameraController.cs

### Changed
- General Code cleanup; some things might become private.
- Move EOSManager, EOSConfig, into PlayEveryWare.EpicOnlineServices namespace.
- add support for installable samples from the UPM Package Manager.


## [0.0.1-preview+1334ed1a5ea6c30f915bca0290c12abc94e179d0] - 2021-05-10

### Added
- Auth: Add support for logging in with persistent tokens.
- Auth: Add Support for logging in with Connect API Only.
- Leaderboards
- EOSManager Utility: EpicLauncher helper method added for getting the options passed to the client. May be used for various Connect Login things.
- DLLHandle can now load single functions from the DLL it's managing.
- Player Data Storage
- Sessions
- Samples: Leaderboard sample code
- Samples: Add Scene Selector
- Samples: Session UI
- Samples: Player Data Storage UI

### Changed
- Chore: Code Cleanup
- Chore: Documentation
- Chore: Spell check
- C# Code now also reads the encryption key from the JSON config file
- modify some existing code to work for future 1.12 code drop (add 1.12 and define EOS_VERSION_1_12 to use)

### Removed

### Fixed
- Replaced debug GfxPluginNativeRender DLLs with release DLLs

### Security

## [0.0.1-preview+481942a5073bacc6d6f1e4c6c31d11f399ef2c2f] - 2021-04-29

### Added
- Added basic android documentation
- Added a better EOS UPM plugin readme
- Added missing art assets for samples

### Changed
- Moved some documentation to other locations.
- Plugin now creates the Platform Interface in the NativeRender and passed it to Unity in Windows Standalone builds

### Removed
- NONE

### Fixed
- Marked GfxPluginNativeRender-x86 to default load
- Marked GfxPluginNativeRender-x64 to default load

### Security
- NONE

## [0.0.1] - 2021-04-22
### Added
First code drop of all the EOS things

# vim: set spell:
7 changes: 7 additions & 0 deletions CHANGELOG.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions Documentation~/android/readme_android.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## What is the Android Helper Library?
It's a dynamically linked library and AAR that brings in the C++ dependencies that the
EOS SO needs on Android, and provides a place for any native Android code to live.

## Building the Android Helper library.
Prerequisites:
* Android NDK installed
* Android SDK installed
* Cmake installed (Installed with NDK)
* Java
* Android Studio or Gradle configured to work with the Android SDK

To get it to compile, you'll need to have the android NDK, and android SDK setup.
The process to setup the SDK and NDK is mostly automated by either Android Studio or Unity.

Otherwise, you can just use gradle, and build it by modifying where it searches for
the NDK and the SDK. While it should be possible to use the version installed for Unity to
compile the library, it isn't required.

Building should just be as simple as running ```gradle build``` if one's environment is setup correctly for
gradle, or as easy as hitting 'build' in Android Studio.

After it's built, you'll need to copy the aar from the build directory into the Assets/Plugins/Android/ directory.
One can find the aar in UnityHelpers_Android/build/outputs/aar/ .
53 changes: 53 additions & 0 deletions Documentation~/class_description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

----------------------------------------------------------------------------------------
## Class description

### EOSManager
Class that acts as the interface to EOS.
Exposes a friendly interface for Unity.
An instance of this must be added to all scenes that want to handle EOS, currently.
The settings it has are read in from a JSON file that's created by the EpicOnlineServicesConfigEditor, or
modified by hand. The config file is currently fixed at Assets/EOS/Resources/EpicOnlineServicesConfig.json.


### EOSConfig
Contains the key that's needed to startup EOS. This class is used both by the editor code and the EOS plugin at
runtime.

### EpicOnlineServicesConfigEditor
This is the object that handles the Unity Editor plugin's configuration. At the moment it only
is used for making chages to the EOS JSON config file.


### UnityEditorSharedDictionary (Soft Deprecated)
This is a visual studio solution that contains two projects, only one which is being used. The project being used,
the NativeSharedDictonary, was created to work around a curious behaviour and design choice in Unity.

When a DLL is loaded in the Unity editor, it is never unloaded. This is problematic for the EOS SDK because it assumes
that SDK will only be initialized once, and will in-fact return an error if one tries to do so.

To work around this behavior, I (Andrew Hirata) messed around with a few ways of holding on to an EOS handle that could
survive multiple play in editor, till I realised I could abuse the same system that was causing this issue. Namely, I could
create another native DLL, unwrap the handle from a given EOS C# object, and store it in the aforementioned DLL, fetch it on
next 'play', and recreate the C# Object. It's not the best solution, but it allows for mitigating the issue.

A more ideal solution, but one that would require a decent amount of work on the EOS SDK auto-generated C# files, would be to
dynamically load the DLL by hand and load the symbols out by hand when running in the editor.

## Visual Studio Projects

### DynamicLibraryLoaderHelper
This project contains all the native code that is needed to make the plugins work on various platforms.
For the moment that means all the memory management calls are implemented in this Project.

Currently, this project includes source code for platforms that need to be isolated due to potential issues with NDAs.

### NativeRender (Project under the DynamicLibraryLoaderHelper Visual Studio SLN)
At the moment, all it does is search though the Windows registry
to find the EOS Overlay DLL, and then load it when Unity is loading it's
DLLs. It does this so that the Overlay DLL can do it's function
interposing (function hooking) magic. It has to happen early in the
process lifetime, which is why it's implemented in native code.

In the future, this Visual Studio project might contain rendering code or other
hooks as needed to integrate the rendering needs of the EOS SDK.
12 changes: 12 additions & 0 deletions Documentation~/custom_eos_config_location.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Custom EOSConfig reading on Windows

It might be preferable to obfuscate or hide the configuration used for the project.
If one doesn't want to modify the dllmanin. of the GfxPluginNativeRender, one can add a DLL
called EOSGenerated.dll, and export a function called GetConfigAsJSONString() to allow the GfxPluginNativeRender
to configure the EOS platform.

The main reason one might want to do this, is if one wants to have custom logic for which config values would be
specified at launch.

A disadvantage to this method, is that depending on one's choice for deployment, anyone might be able to modify the
DLL and specify different configuration values for your title.
65 changes: 65 additions & 0 deletions Documentation~/standards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Standards

### Language Style Guides

#### For C
Function names are prefixed, and lowercase snake case.
The Epic Online Services SDK has it's one standards and style [guide](https://docs.unrealengine.com/4.26/en-US/ProductionPipelines/DevelopmentSetup/CodingStandard/).

#### For C++

#### For C#
This follows, more or less, Microsoft's C# style [guide](https://docs.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions).

### Commit Message Style
While not strictly enforced, the current idea for commit messages is to use something like the following:

```
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
```

e.g.:
```
fix(dll_loading)!: Change how DLLs are loaded to fix big bad bug.
There was a nasty bug. It's gone now.
BREAKING CHANGE:
```

Here is an incomplete list of 'types'
```
fix: Fixes a bug.
feat: Adds a new feature.
docs: Changes to the documentation, not code.
refactor: Code change that does not directly fix a bug.
perf: A code change aimed at increasing performance
chore: Small changes that are needed to maintain something. Examples of chores are: Updating Keys, adding comments, or style changes.
revert: used to mark a reverted commit. The footer should have the sha
upgrade: Upgrade a third-party dependency. These often are a combonation of a chore, fix, refactor, and feat, and thus deserve their own type
```

Scopes are somewhat more free form in nature. It is preferred that they are nouns, and required that they are single words.
If a given commit has multiple scopes it affects, then commas may be used

Examples:
```
(style): Changes to a either code or documentation that are style only.
(comments): Used for changes that only add comments.
```

More details here
https://www.conventionalcommits.org/en/v1.0.0/


### Changelist Style Guide
TODO: There isn't a changelist yet, but it will probably follow https://keepachangelog.com/en/1.0.0/

### Release Scheme
TODO: Expand this with an inline defintion. Probably going to follow follow https://semver.org/ .

8 changes: 8 additions & 0 deletions Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit fa892b6

Please sign in to comment.