Add example Unity Project

This commit is contained in:
Michał Gdula 2023-04-26 01:55:33 +01:00
parent fda7ff28dd
commit e3acdb9d6b
7122 changed files with 505543 additions and 2 deletions

View file

@ -0,0 +1,5 @@
{
"timestamp": 1669744818,
"signature": "aLFVTF7UnakkulkHkeDjQacIM1IVs3DVPYMF+Qsepsi8AokbcTXgIzVuoohb7PBP9PfDyJdCmYLuol39OHY6pqx+KD+Hgbky2f1RQJ5vEW72Ztgg043xoeLzGo3EXvOlr3LQjJDrt14xsdPcVyNaEd9Ch5RSVHg0y3OvdFKb3X1mSqr+4yf3k47agQ21/WGIk1sz6+9EyG8NwST5I3JUEd4/Ew9y8fRPvBHKmye+cWBd1NazB2lPKT4HxfqNCr7d/3Sw/7D7uSPkAJFskL0p2mKDssMipfniKVHYyy9XrUzeX15nlbqz5ZJZNMpZWz5DbxPURmCbxcsUHTFVom3v6lcdRAz3xcv7nFwsmpemBbCJ0ke11zGbfaLoYqlJrEvFwY1ESO1alJhx/vth/1ErMaSEPldc3fIE3V+oEZl3kYvdRkMbRbyzSwxCyEqKnfCVh3kkRcEE1v0RbBpmcRaa5NbpR+gCzI2EFA24v0/fscN1AejBMrOiYrXdDTo8W8pE",
"publicKey": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQm9qQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FZOEFNSUlCaWdLQ0FZRUFzdUhXYUhsZ0I1cVF4ZEJjTlJKSAordHR4SmoxcVY1NTdvMlZaRE1XaXhYRVBkRTBEMVFkT1JIRXNSS1RscmplUXlERU83ZlNQS0ZwZ1A3MU5TTnJCCkFHM2NFSU45aHNQVDhOVmllZmdWem5QTkVMenFkVmdEbFhpb2VpUnV6OERKWFgvblpmU1JWKytwbk9ySTRibG4KS0twelJlNW14OTc1SjhxZ1FvRktKT0NNRlpHdkJMR2MxSzZZaEIzOHJFODZCZzgzbUovWjBEYkVmQjBxZm13cgo2ZDVFUXFsd0E5Y3JZT1YyV1VpWXprSnBLNmJZNzRZNmM1TmpBcEFKeGNiaTFOaDlRVEhUcU44N0ZtMDF0R1ZwCjVNd1pXSWZuYVRUemEvTGZLelR5U0pka0tldEZMVGdkYXpMYlpzUEE2aHBSK0FJRTJhc0tLTi84UUk1N3UzU2cKL2xyMnZKS1IvU2l5eEN1Q20vQWJkYnJMbXk0WjlSdm1jMGdpclA4T0lLQWxBRWZ2TzV5Z2hSKy8vd1RpTFlzUQp1SllDM0V2UE16ZGdKUzdGR2FscnFLZzlPTCsxVzROY05yNWdveVdSUUJ0cktKaWlTZEJVWmVxb0RvSUY5NHpCCndGbzJJT1JFdXFqcU51M3diMWZIM3p1dGdtalFra3IxVjJhd3hmcExLWlROQWdNQkFBRT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg"
}

View file

@ -0,0 +1,102 @@
# Changelog
All notable changes to this package will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [2.0.4] - 2022-11-24
bump version number to publish
## [2.0.3] - 2022-10-31
add support for new IL2CPP arguments APIs for 2022.1.23f1+ editors
## [2.0.2] - 2022-05-23
bump version number to publish
## [2.0.1] - 2022-04-27
bump version number to publish
## [2.0.0] - 2022-03-28
- Fix 1336012 - Build from windows fails if username contains space
- Add support for new IL2CPP arguments APIs
## [1.0.0] - 2021-12-15
label as released package
## [0.1.19] - 2021-07-15
link libstdc++ statically
## [0.1.18] - 2021-02-22
use latest sysroot base
## [0.1.17] - 2021-01-11
use latest sysroot base
## [0.1.16] - 2020-11-24
use latest base and sysroot
## [0.1.15] - 2020-11-09
changed namespace to prevent NiceIO conflicts
## [0.1.14] - 2020-10-26
fixed issue where NiceIO would conflict with other packages using it
## [0.1.13] - 2020-09-23
use latest base
## [0.1.12] - 2020-09-22
use latest base
## [0.1.10] - 2020-07-26
use latest base and sysroot
## [0.1.9] - 2020-07-26
pickup validation meta file
## [0.1.8] - 2020-07-20
use latest base
## [0.1.7] - 2020-07-15
use latest sysroot & base
## [0.1.6] - 2020-05-27
documentation
## [0.1.5] - 2020-05-25
fix regression
## [0.1.4] - 2020-05-24
Reorganization
## [0.1.3] - 2020-05-21
Quote paths
## [0.1.2] - 2020-04-29
Pickup base changes
## [0.1.1] - 2020-04-27
Cleanup
## [0.1.0] - 2020-04-14
### This is the first release of *Unity Package com.unity.toolchain.linux-x86_64*.
Initial release separating toolchain from sysroot

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ac31dd48a6c63fbdb8593e0542545f0d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3bf5adcbe74ea0cf9b97900b9f6dfaac
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,18 @@
{
"name": "Unity.Toolchain.Linux-x86_64",
"references": [
"Unity.SysrootPackage.Editor",
"Unity.Sysroot.Linux_x86_64"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"versionDefines": [
{
"name": "Unity",
"expression": "(0,2022.1.23f1)",
"define": "IL2CPP_LEGACY_API_PRESENT"
}
]
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f851af5d86c208af09cd265d08e3b3e2
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,93 @@
using System;
using System.IO;
using System.Collections.Generic;
using UnityEngine;
using NiceIO.Sysroot;
using UnityEditor.Il2Cpp;
namespace UnityEditor.Il2Cpp
{
/// <summary>
/// Toolchain package for building Linux x86_64 targets on Linux x86_64 host
/// </summary>
public class ToolchainLinuxX86_64: SysrootLinuxX86_64
{
private string _packageName => "com.unity.toolchain.linux-x86_64";
/// <summary>
/// Name of package
/// </summary>
public override string Name => _packageName;
/// <summary>
/// Name of host platform
/// </summary>
public override string HostPlatform => "linux";
/// <summary>
/// Name of host architecture
/// </summary>
public override string HostArch => "x86_64";
/// <summary>
/// Name of target platform
/// </summary>
public override string TargetPlatform => "linux";
/// <summary>
/// Name of target architecture
/// </summary>
public override string TargetArch => "x86_64";
private string _payloadVersion => "9.0.1-7.7.1908-v0_9c1c26d5205c7ead3cba5a545796579d753c459ac5e16d0690d1b087efa7835d";
private string _payloadDir;
private string _target => "x86_64-glibc2.17-linux-gnu";
private string _linkerFile => "bin/ld.lld";
/// <summary>
/// Initialize toolchain package
/// </summary>
public ToolchainLinuxX86_64()
: base()
{
_payloadDir = $"linux-x86/{_payloadVersion}";
RegisterPayload(_packageName, _payloadDir);
}
/// <summary>
/// Supplies arguments to il2cpp.exe
/// </summary>
/// <returns>The next argument to il2cpp.exe</returns>
public override IEnumerable<string> GetIl2CppArguments()
{
var toolpath = PayloadInstallDirectory(_payloadDir);
var linkerpath = toolpath.Combine(_linkerFile);
yield return $"--sysroot-path={SysrootInstallDirectory()}";
yield return $"--compiler-flags=\"-target {_target}\"";
yield return $"--tool-chain-path={toolpath.InQuotes()}";
yield return $"--linker-flags=\"-fuse-ld={linkerpath.InQuotes()} -target {_target} -static-libstdc++\"";
}
#if !IL2CPP_LEGACY_API_PRESENT
public override string GetSysrootPath()
{
return SysrootInstallDirectory().Trim('"');
}
public override string GetToolchainPath()
{
return PayloadInstallDirectory(_payloadDir).ToString();
}
public override string GetIl2CppCompilerFlags()
{
return $"-target {_target}";
}
public override string GetIl2CppLinkerFlags()
{
var toolpath = PayloadInstallDirectory(_payloadDir);
var linkerpath = toolpath.Combine(_linkerFile);
return $"-fuse-ld={linkerpath.InQuotes()} -target {_target} -static-libstdc++";
}
#endif
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8df26e4ae26046f0a827b54f6aa67f04
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,5 @@
com.unity.toolchain.linux-x86_64 copyright © 2020 Unity Technologies ApS
Source code of the package licensed under the Unity Companion License (see https://unity3d.com/legal/licenses/unity_companion_license); otherwise licensed under the Unity Package Runtime Distribution License (see https://unity3d.com/legal/licenses/Unity_Package_Runtime_Distribution_License).
Unless expressly provided otherwise, the software under this license is made available strictly on an “AS IS” BASIS WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. Please review the license for details on these and other terms and conditions.

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 25c7823ec1068a4d49626b816b321aab
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,13 @@
# com.unity.toolchain.linux-x86_64
This package provides a clang (9.0.1) toolchain for building il2cpp players on linux x86_64 systems.
This package is available as a pre-release package, so it is still in the process of becoming stable enough to release. The features and documentation in this package might change before it is ready for release. 
## Installation
To install this package, refer to the instructions that match your Unity Editor version:
### Version 2021.1 and later
To install this package, make sure you [enable pre-release packages](https://docs.unity3d.com/2021.1/Documentation/Manual/class-PackageManager.html#advanced_preview) in the Unity Editor's Package Manager, and then follow the [installation instructions in the Unity User Manual](https://docs.unity3d.com/Documentation/Manual/upm-ui-install.html). 
### Version 2020.3 
To install this package, make sure you [show preview packages](https://docs.unity3d.com/2020.3/Documentation/Manual/class-PackageManager.html#advanced_preview) in the Unity Editor's Package Manager, and then follow the [installation instructions in the Unity User Manual](https://docs.unity3d.com/2020.3/Documentation/Manual/upm-ui-install.html).
### Version 2019.4 
To install this package, make sure you [show preview packages](https://docs.unity3d.com/2019.4/Documentation/Manual/upm-ui-list.html#ShowPreview) in the Unity Editor's Package Manager, and then follow the [installation instructions in the Unity User Manual](https://docs.unity3d.com/2019.4/Documentation/Manual/upm-ui-install.html).

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: e476833ad0eb3d6afa792f32246c42d2
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 5a0086b2cca8070de884733169bbf04e
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a92e90f8d5f3b7bd48967a27d8fbdebe
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,22 @@
using UnityEngine;
using UnityEditor;
using UnityEngine.TestTools;
using NUnit.Framework;
using System.Collections;
class EditorExampleTest {
[Test]
public void EditorSampleTestSimplePasses() {
// Use the Assert class to test conditions.
}
// A UnityTest behaves like a coroutine in PlayMode
// and allows you to yield null to skip a frame in EditMode
[UnityTest]
public IEnumerator EditorSampleTestWithEnumeratorPasses() {
// Use the Assert class to test conditions.
// yield to skip a frame
yield return null;
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 21eb57946ff848efeac74b522cb5976c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,21 @@
{
"name": "Unity.Toolchain.Linux-x86_64.EditorTests",
"references": [
"Unity.Toolchain.Editor",
"Unity.Sysroot"
],
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"versionDefines": [
{
"name": "Unity",
"expression": "(0,2022.1.23f1)",
"define": "IL2CPP_LEGACY_API_PRESENT"
}
]
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 138e8122bb82938fe9a6eee7a4985427
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,82 @@
This package contains third-party software components governed by the license(s) indicated below:
---------
Component Name: LLVM 9.0.0
License Type: Apache 2.0 with LLVM Exceptions
Copyright: The LLVM project does not collect copyright assignments, which
means that the copyright for the code in the project is held by the
respective contributors. Because you (or your company) retain ownership of
the code you contribute, you know it may only be used under the terms of the
open source license you contributed it under: the license for your
contributions cannot be changed in the future without your approval.
https://github.com/llvm/llvm-project/tree/main/llvm
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
---- LLVM Exceptions to the Apache 2.0 License ----
As an exception, if, as a result of your compiling your source code, portions
of this Software are embedded into an Object form of such source code, you
may redistribute such embedded portions in such Object form without complying
with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
In addition, if you combine or link compiled forms of this Software with
software that is licensed under the GPLv2 ("Combined Software") and if a
court of competent jurisdiction determines that the patent provision (Section
3), the indemnity provision (Section 9) or other Section of the License
conflicts with the conditions of the GPLv2, you may retroactively and
prospectively choose to deem waived or otherwise exclude such Section(s) of
the License, but only in their entirety and only with respect to the Combined
Software.
---------
Component Name: Legacy LLVM License
License Type: University of Illinois/NCSA Open Source License (NCSA)
Copyright (c) 2007-2019 University of Illinois at Urbana-Champaign. All rights reserved.
https://llvm.org/docs/DeveloperPolicy.html#legacy
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal with
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimers.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimers in the
documentation and/or other materials provided with the distribution.
* Neither the names of the LLVM Team, University of Illinois at
Urbana-Champaign, nor the names of its contributors may be used to
endorse or promote products derived from this Software without specific
prior written permission.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
SOFTWARE.

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: fb6d64d4cca2e56778082a1c7685fbac
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,19 @@
{
"FileContentKeywordValidation":
{
"Keywords":
[
{
"Targets": "+Switch",
"Files":
[
"Editor/Unity.Toolchain.cs"
],
"Patterns":
[
"ld\\.lld"
]
}
]
}
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 19ec794be6c353ba2a3ca871b1793808
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,24 @@
{
"name": "com.unity.toolchain.linux-x86_64",
"displayName": "Toolchain Linux x64",
"description": "Toolchain to build player target Linux x86_64 on host Linux x86_64",
"version": "2.0.4",
"unity": "2019.4",
"keywords": [
"toolchain",
"linux"
],
"dependencies": {
"com.unity.sysroot": "2.0.5",
"com.unity.sysroot.linux-x86_64": "2.0.4"
},
"upmCi": {
"footprint": "a301a0ca492599d62afe2036f46c8ea8ec5971bb"
},
"documentationUrl": "https://docs.unity3d.com/Packages/com.unity.toolchain.linux-x86_64@2.0/manual/index.html",
"repository": {
"url": "https://github.com/Unity-Technologies/com.unity.sysroot.git",
"type": "git",
"revision": "06af5d019fed618daef07b5db278be147aed574b"
}
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: b75d9a0470b1635b1a19f29fe9d743da
PackageManifestImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: