added nobel connect for p2p support:

This commit is contained in:
logzinga 2023-02-27 11:54:15 +11:00
parent 42da9e8a60
commit 1390b86b66
46 changed files with 1438 additions and 19 deletions

10
Assets/Noble Connect.meta Normal file
View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 47960fcc1509505478abb826d0ddd57b
folderAsset: yes
timeCreated: 1538747955
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,123 @@
using NobleConnect.Ice;
using System;
using System.Text;
using UnityEngine;
namespace NobleConnect
{
[Serializable]
public class Config
{
[NonSerialized]
public ushort IcePort;
[NonSerialized]
public string Username;
[NonSerialized]
public string Password;
[NonSerialized]
public string Origin;
[NonSerialized]
public bool UseSimpleAddressGathering = false;
public Action<string> OnFatalError;
public Action OnOfferFailed;
/// <summary>The geographic region to use when selecting a relay server.</summary>
/// <remarks>
/// Defaults to AUTO which will automatically select the closest region.
/// This is useful if you would like your players to be able to choose
/// their region at run time.
/// Note that players are not prevented from connecting across regions.
/// That would need to be implementing separately via matchmaking for
/// example, by filtering out matches from undesired regions.
/// </remarks>
[Tooltip("The geographic region to use when selecting a relay server.")]
public GeographicRegion Region;
/// <summary>You can enable this to force relay connections to be used for testing purposes.</summary>
/// <remarks>
/// Disables punchthrough and direct connections. Forces connections to use the relays.
/// This is useful if you want to test your game with the unavoidable latency that is
/// introduced when the relay servers are used.
/// </remarks>
[Tooltip("Enable this to force relay connections to be used for testing purposes.")]
public bool ForceRelayOnly = false;
/// <summary>By default IPv6 is enabled, but you can disable it if you're using a transport that does not support IPv6</summary>
[Tooltip("By default IPv6 is enabled, but you can disable it if you're using a transport that does not support IPv6.")]
public bool EnableIPv6 = true;
/// <summary>Request timeout.</summary>
/// <remarks>
/// This effects how long to wait before considering a request to have failed.
/// Requests are used during the punchthrough process and for setting up and maintaining relays.
/// If you are allowing cross-region play or expect high latency you can increase this so that requests won't time out.
/// The drawback is that waiting longer for timeouts causes it take take longer to detect actual failed requests so the
/// connection process may take longer.
/// </remarks>
[Tooltip("How long to wait before considering a request to have failed.")]
public float RequestTimeout = .2f;
/// <summary>Initial timeout before resending refresh messages. This is doubled for each failed resend.</summary>
[Tooltip("Initial timeout before resending refresh messages. This is doubled for each failed resend.")]
public float RelayRequestTimeout = .1f;
/// <summary>Max number of times to try and resend refresh messages before giving up and shutting down the relay connection.</summary>
[Tooltip("Max number of times to try and resend refresh messages before giving up and shutting down the relay connection.")]
public int RelayRefreshMaxAttempts = 8;
/// <summary>How long a relay will stay alive without being refreshed</summary>
/// <remarks>
/// Setting this value higher means relays will stay alive longer even if the host temporarily loses connection or otherwise fails to send the refresh request in time.
/// This can be helpful to maintain connection on an undependable network or when heavy application load (such as loading large levels synchronously) temporarily prevents requests from being processed.
/// The drawback is that CCU is used for as long as the relay stays alive, so players that crash or otherwise don't clean up properly can cause lingering CCU usage for up to relayLifetime seconds.
/// </remarks>
[Tooltip("How long a relay will stay alive without being refreshed.")]
public int RelayLifetime = 60;
/// <summary>How often to send relay refresh requests.</summary>
[Tooltip("How often to send relay refresh requests.")]
public int RelayRefreshTime = 30;
public IceConfig AsIceConfig()
{
// Get a reference to the NobleConnectSettings
var settings = (NobleConnectSettings)Resources.Load("NobleConnectSettings", typeof(NobleConnectSettings));
// Parse the username, password, and origin from the game id
string username = "", password = "", origin = "";
if (!string.IsNullOrEmpty(settings.gameID))
{
string decodedGameID = Encoding.UTF8.GetString(Convert.FromBase64String(settings.gameID));
string[] parts = decodedGameID.Split('\n');
if (parts.Length == 3)
{
username = parts[1];
password = parts[2];
origin = parts[0];
}
}
var iceConfig = new IceConfig {
iceServerAddress = RegionURL.FromRegion(Region),
icePort = settings.relayServerPort,
username = username,
password = password,
origin = origin,
useSimpleAddressGathering = (Application.platform == RuntimePlatform.IPhonePlayer || Application.platform == RuntimePlatform.Android) && !Application.isEditor,
onFatalError = OnFatalError,
onOfferFailed = () => OnFatalError("Offer failed"),
forceRelayOnly = ForceRelayOnly,
enableIPv6 = EnableIPv6,
RequestTimeout = RequestTimeout,
RelayRequestTimeout = RelayRequestTimeout,
RelayRefreshMaxAttempts = RelayRefreshMaxAttempts,
RelayLifetime = RelayLifetime,
RelayRefreshTime = RelayRefreshTime
};
return iceConfig;
}
}
}

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: 2c0f41f48ef7e7248a5db28d31441b2c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
applyGammaDecoding: 1
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 1
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,19 @@
using UnityEngine;
namespace NobleConnect
{
/// <summary>Settings used by Noble Connect to authenticate with the relay and punchthrough services</summary>
public class NobleConnectSettings : ScriptableObject
{
/// <summary>Used to identify your game and authenticate with the relay servers</summary>
/// <remarks>
/// This is populated for you when you go through the setup wizard but you can also set it manually here.
/// Your game ID is available any time on the dashboard at noblewhale.com
/// </remarks>
[Tooltip("Used to identify your game and authenticate with the relay servers")]
public string gameID;
[HideInInspector]
public ushort relayServerPort = 3478;
}
}

View File

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

View File

@ -0,0 +1,15 @@
using UnityEngine;
using UnityEngine.UI;
namespace NobleConnect.Examples
{
public class TextFromFile : MonoBehaviour
{
public TextAsset TextFile;
void OnValidate()
{
GetComponent<Text>().text = TextFile.text;
}
}
}

View File

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

View File

@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace NobleConnect
{
public class UnityLogger
{
public static void Init()
{
Logger.logger = Debug.Log;
Logger.warnLogger = Debug.LogWarning;
Logger.errorLogger = Debug.LogError;
//Logger.logLevel = Logger.Level.Developer;
}
}
}

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,77 @@
fileFormatVersion: 2
guid: e07dc4a0a043f9b4ab82f3967dcb9a2a
timeCreated: 1551016206
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 537f111e71c987b409f64bd60743a6b2
folderAsset: yes
timeCreated: 1539153299
licenseType: Store
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,52 @@
#if UNITY_EDITOR
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
namespace NobleConnect
{
/// <summary>
/// Adds the given define symbols to PlayerSettings define symbols.
/// Just add your own define symbols to the Symbols property at the below.
/// </summary>
[InitializeOnLoad]
public class AddNobleConnectScriptingDefine : Editor
{
/// <summary>
/// Symbols that will be added to the editor
/// </summary>
public static readonly string[] Symbols = new string[] {
"NOBLE_CONNECT", // Noble Connect exists
"NOBLE_CONNECT_1", // Major version
"NOBLE_CONNECT_1_37" // Major and minor version
};
/// <summary>
/// Add define symbols as soon as Unity gets done compiling.
/// </summary>
static AddNobleConnectScriptingDefine()
{
// Get the current scripting defines
string definesString = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup);
// Convert the string to a list
List<string> allDefines = definesString.Split(';').ToList();
// Remove any old version defines from previous installs
for (int i = allDefines.Count-1; i >= 0; i--)
{
if (allDefines[i].StartsWith("NOBLE_CONNECT") && !Symbols.Contains(allDefines[i]))
{
allDefines.RemoveAt(i);
}
}
// Add any symbols that weren't already in the list
allDefines.AddRange(Symbols.Except(allDefines));
PlayerSettings.SetScriptingDefineSymbolsForGroup(
EditorUserBuildSettings.selectedBuildTargetGroup,
string.Join(";", allDefines.ToArray())
);
}
}
}
#endif

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: b53ae3111803795478bcbb739ad557f1
timeCreated: 1551018990
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 35ce04e51d0abb847890436754a88096, type: 3}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,42 @@
using System;
using UnityEngine.Networking;
using System.Security.Cryptography.X509Certificates;
using UnityEngine;
namespace NobleConnect.Internal
{
#if !UNITY_5 && !UNITY_2017
public class AmazonCertificateHandler : CertificateHandler
{
// Encoded RSAPublicKey
private static readonly string PUB_KEY = "3082010A0282010100CCCC0263917F8002CD937BEDCD06F29" +
"919F82E724EE5012E2C02991AD7FA06603D927975B099FF23" +
"CA94A876ED8F9871051ED81A13D1486534BCF1B07277DC0DA" +
"26C79C03B58590C9B2724917C68E3A10368ABFC214C20D8DF" +
"E3BC8ACE0519C776E9F9EC93FADD6C6A5E1CDA1A24867D67F" +
"EC0AF2B0DB8DD1BBB7D020331B7C0ECF838B57C73E6FF6722" +
"F17A9DF74391CFC4914B44B77655B79223E1E550F715AD6F1" +
"4BF3E755FFF815526C162BB3F379FFB5272D3C0EA59A35D1E" +
"9E49B94872EB768250BA3DBBFFD042015BDD2B1DFD164B950" +
"6D7DA324B63348122CE9EB368DB2FF0E02AD6B7A453A28B11" +
"E67591FC2CC0B74E1C80688C535D32DC692C08ED0203010001";
/// <summary>
/// Validate the Certificate Against the Amazon public Cert
/// </summary>
/// <param name="certificateData">Certifcate to validate</param>
/// <returns></returns>
protected override bool ValidateCertificate(byte[] certificateData)
{
X509Certificate2 certificate = new X509Certificate2(certificateData);
string pk = certificate.GetPublicKeyString();
if (pk.ToLower().Equals(PUB_KEY.ToLower()))
{
return true;
}
return false;
}
}
#endif
}

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1,77 @@
fileFormatVersion: 2
guid: e2718437b8b970d43918120542ad4bcd
timeCreated: 1539817181
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: -1
wrapV: -1
wrapW: -1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,386 @@
using System;
using System.Collections;
using System.Text;
using NobleConnect;
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;
public class SetupWizard : EditorWindow
{
const string windowTitle = "Noble Connect";
const string titleText = "Noble Connect Setup";
const string bodyText = "\nEnter your game id or email address to enable Noble Connect.\n\n" +
"The service is free to use for development but bandwidth and CCU is limited.\n" +
"Visit noblewhale.com to upgrade to a paid account and remove the bandwidth and CCU limits.";
const string signUpSuccessText = "Successful account signup. \n\n" +
"Load up an example to get started or visit our website to upgrade to a paid account.\n";
const string accountAlreadyExistsText = "User already exists. \n\n" +
"Log in at noblewhale.com to get your game ID.\n";
const string otherErrorText = "An error has occurred. \n\n" +
"Log in at noblewhale.com to get your game ID.\n";
const string enteredGameIDText = "GameID entered. \n\n" +
"Welcome back. Visit noblewhale.com to upgrade to a paid account\n" +
"and remove the bandwidth and CCU limits.\n";
Texture2D logo, bg;
GUIStyle headerStyle = new GUIStyle();
GUIStyle titleStyle = new GUIStyle();
GUIStyle logoStyle = new GUIStyle();
GUIStyle bodyStyle = new GUIStyle();
GUIStyle secondScreenStyle = new GUIStyle();
bool clickedActivate = false;
bool accountActivated = false;
bool accountAlreadyExists = false;
bool otherError = false;
bool enteredGameID = false;
IEnumerator createAccountRequest;
string emailOrGameID;
SetupWizard()
{
minSize = new Vector2(530, 300);
}
void OnEnable()
{
if (logo == null)
{
string[] paths = AssetDatabase.FindAssets("whale_256 t:Texture2D");
if (paths != null && paths.Length > 0)
{
logo = AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath(paths[0]));
}
}
if (bg == null)
{
string[] paths = AssetDatabase.FindAssets("Noble Setup Title Background t:Texture2D");
if (paths != null && paths.Length > 0)
{
bg = AssetDatabase.LoadAssetAtPath<Texture2D>(AssetDatabase.GUIDToAssetPath(paths[0]));
}
}
}
void Update()
{
if (createAccountRequest != null) createAccountRequest.MoveNext();
}
void OnGUI()
{
DrawHeader();
if (!accountActivated && !accountAlreadyExists && !otherError && !enteredGameID)
{
bodyStyle.padding = new RectOffset(10, 10, 0, 5);
EditorGUILayout.BeginVertical(bodyStyle);
GUILayout.Label(bodyText);
GUILayout.Label("\nEmail or Game ID");
emailOrGameID = EditorGUILayout.TextField(emailOrGameID);
EditorGUILayout.BeginHorizontal();
GUILayout.FlexibleSpace();
if (!clickedActivate && GUILayout.Button("Activate"))
{
createAccountRequest = ActivateAccount();
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
// Account creation success.
if (accountActivated)
{
bodyStyle.padding = new RectOffset(15, 10, 15, 5);
EditorGUILayout.BeginVertical(bodyStyle);
GUILayout.Label(signUpSuccessText);
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
secondScreenStyle.padding = new RectOffset(15, Screen.width, 10, 5);
if (GUILayout.Button("Sign Up for Pro"))
{
Application.OpenURL("http://noblewhale.com");
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Close Window"))
{
this.Close();
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
// Found account with this email already.
else if (accountAlreadyExists)
{
bodyStyle.padding = new RectOffset(15, 10, 15, 5);
//GUI.contentColor = Color.red;
//bodyStyle.normal.textColor = Color.red;
EditorGUILayout.BeginVertical(bodyStyle);
GUILayout.Label(accountAlreadyExistsText);// secondScreenStyle);
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
secondScreenStyle.padding = new RectOffset(15, Screen.width, 10, 5);
if (GUILayout.Button("Go to noblewhale.com"))
{
Application.OpenURL("http://noblewhale.com");
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Close Window"))
{
this.Close();
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
else if (otherError)
{
bodyStyle.padding = new RectOffset(15, 10, 15, 5);
//bodyStyle.normal.textColor = new Color(204,0,0);
EditorGUILayout.BeginVertical();
GUILayout.Label(otherErrorText, bodyStyle);
EditorGUILayout.EndVertical();
//bodyStyle.normal.textColor = Color.black;
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
secondScreenStyle.padding = new RectOffset(15, Screen.width, 10, 5);
if (GUILayout.Button("Go to noblewhale.com"))
{
Application.OpenURL("http://noblewhale.com");
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Close Window"))
{
this.Close();
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
else if (enteredGameID)
{
bodyStyle.padding = new RectOffset(15, 10, 15, 5);
//bodyStyle.normal.textColor = new Color(204,0,0);
EditorGUILayout.BeginVertical();
GUILayout.Label(enteredGameIDText, bodyStyle);
EditorGUILayout.EndVertical();
//bodyStyle.normal.textColor = Color.black;
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
secondScreenStyle.padding = new RectOffset(15, Screen.width, 10, 5);
if (GUILayout.Button("Go to noblewhale.com"))
{
Application.OpenURL("http://noblewhale.com");
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
EditorGUILayout.BeginVertical(secondScreenStyle);
EditorGUILayout.BeginHorizontal();
if (GUILayout.Button("Close Window"))
{
this.Close();
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
}
IEnumerator ActivateAccount()
{
clickedActivate = true;
string gameID = emailOrGameID;
if (emailOrGameID.Contains("@"))
{
gameID = null;
WWWForm form = new WWWForm();
form.AddField("username", emailOrGameID);
form.AddField("email", emailOrGameID);
#if UNITY_5 || UNITY_2017
WWW w = new WWW("https://robot:z3hZAY*1ESiq7ecUR&OxFFNO@noblewhale.com/wp-json/wp/v2/users", form);
while (!w.isDone) yield return 0;
if (w.error != null && w.error != "")
{
if (w.text.Contains("existing_user_login"))
{
Debug.LogError("User already exists. Log in at noblewhale.com to get your game ID.");
// TODO: Display error notification window
accountAlreadyExists = true;
}
else
{
Debug.LogError(w.error + " " + w.text);
otherError = true;
}
}
else
{
// Get the newly created game id from the response text
// Manually parsing some json to avoid third party libraries and a bunch of needless overhead
string key = "\"game_id_0\"";
int keyIndex = w.text.IndexOf(key);
int valueStartIndex = w.text.IndexOf("\"", keyIndex + key.Length + 1) + 1;
int valueEndIndex = w.text.IndexOf("\"", valueStartIndex + 1);
string value = w.text.Substring(valueStartIndex, valueEndIndex - valueStartIndex);
gameID = value;
accountActivated = true;
}
w.Dispose();
#else
using (var w = UnityEngine.Networking.UnityWebRequest.Post("https://robot:z3hZAY*1ESiq7ecUR&OxFFNO@noblewhale.com/wp-json/wp/v2/users", form))
{
var amazonCertificateHandler = new CertificateDisregarder();
w.certificateHandler = amazonCertificateHandler;
yield return w.SendWebRequest();
while (!w.isDone) yield return 0;
var result = w.downloadHandler.text;
#if UNITY_2020_1_OR_NEWER
if (w.result == UnityEngine.Networking.UnityWebRequest.Result.ConnectionError || w.result == UnityEngine.Networking.UnityWebRequest.Result.ProtocolError)
#else
if (w.isNetworkError || w.isHttpError)
#endif
{
if (result.Contains("existing_user_login"))
{
Debug.LogError("User already exists. Log in at noblewhale.com to get your game ID.");
// TODO: Display error notification window
accountAlreadyExists = true;
}
else
{
Debug.LogError(w.error + " " + result);
otherError = true;
}
}
else
{
// Get the newly created game id from the response text
// Manually parsing some json to avoid third party libraries and a bunch of needless overhead
Debug.Log(result);
StringBuilder sb = new StringBuilder();
foreach (var dict in w.GetResponseHeaders())
{
sb.Append(dict.Key).Append(": \t[").Append(dict.Value).Append("]\n");
}
// Print Headers
Debug.Log(sb.ToString());
string key = "\"game_id_0\"";
int keyIndex = result.IndexOf(key);
int valueStartIndex = result.IndexOf("\"", keyIndex + key.Length + 1) + 1;
int valueEndIndex = result.IndexOf("\"", valueStartIndex + 1);
string value = result.Substring(valueStartIndex, valueEndIndex - valueStartIndex);
gameID = value;
accountActivated = true;
}
}
#endif
}
else
{
enteredGameID = true;
// TODO: Test gameID somehow
}
if (gameID != null)
{
var settings = (NobleConnectSettings)Resources.Load("NobleConnectSettings", typeof(NobleConnectSettings));
if (!settings)
{
settings = ScriptableObject.CreateInstance<NobleConnectSettings>();
if (!AssetDatabase.IsValidFolder("Assets/Noble Connect"))
{
AssetDatabase.CreateFolder("Assets", "Noble Connect");
}
if (!AssetDatabase.IsValidFolder("Assets/Noble Connect/Resources"))
{
AssetDatabase.CreateFolder("Assets/Noble Connect", "Resources");
}
AssetDatabase.CreateAsset(settings, "Assets/Noble Connect/Resources/NobleConnectSettings.asset");
}
settings.gameID = gameID;
EditorUtility.SetDirty(settings);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
}
}
void DrawHeader()
{
headerStyle.normal.background = bg;
headerStyle.fixedHeight = 68;
EditorGUILayout.BeginHorizontal(headerStyle);
titleStyle.fontSize = 22;
titleStyle.fontStyle = FontStyle.Bold;
titleStyle.padding = new RectOffset(10, 10, 20, 10);
GUILayout.Label(titleText, titleStyle);
GUILayout.FlexibleSpace();
logoStyle.fixedWidth = 50;
logoStyle.margin = new RectOffset(0, 11, 7, 7);
GUILayout.Label(logo, logoStyle);
EditorGUILayout.EndHorizontal();
}
[MenuItem("Window/Noble Connect/Setup", false, 0)]
protected static void MenuItemOpenWizard()
{
GetWindow(typeof(SetupWizard), false, windowTitle, true);
}
[InitializeOnLoad]
public class ShowSetupWizard : EditorWindow
{
static bool hasChecked = false;
static ShowSetupWizard()
{
EditorApplication.update += Update;
}
static void Update()
{
if (EditorApplication.timeSinceStartup > 3.0f && !hasChecked)
{
hasChecked = true;
var settings = (NobleConnectSettings)Resources.Load("NobleConnectSettings", typeof(NobleConnectSettings));
if (!settings || (settings.gameID == ""))
{
SetupWizard window = (SetupWizard)GetWindow(typeof(SetupWizard));
window.Show();
}
}
}
}
public class CertificateDisregarder : CertificateHandler
{
protected override bool ValidateCertificate(byte[] certificateData)
{
return true;
}
}
}

View File

@ -0,0 +1,13 @@
fileFormatVersion: 2
guid: 6ed5d5a6469ade6438c50b3489f723a8
timeCreated: 1551019118
licenseType: Store
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 35ce04e51d0abb847890436754a88096, type: 3}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -0,0 +1,117 @@
fileFormatVersion: 2
guid: 35ce04e51d0abb847890436754a88096
timeCreated: 1551018934
licenseType: Store
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 4
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -1
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- buildTarget: DefaultTexturePlatform
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Standalone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: iPhone
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Android
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- buildTarget: Windows Store Apps
maxTextureSize: 256
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 0
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,3 @@
Step 1: Download and import Mirror: https://assetstore.unity.com/packages/tools/network/mirror-129321
Step 2: Import the package "Assets/Noble Connect/Mirror/Mirror Noble Connect.unitypackage" to add Mirror support to Noble Connect.
Step 3: Check out the example scenes in "Assets/Noble Connect/Mirror/Examples" to get started.

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 8efcd80227d51204789cd37b3318fb67
timeCreated: 1552034575
licenseType: Store
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 4677f09a6725cea43abfebd58f5f6ba7
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,3 @@
Step 1: Use the PackageManager to get NetCode for GameObjects
Step 2: Import the package "Assets/Noble Connect/NetCode for GameObjects/NetCode for GameObjects Noble Connect.unitypackage" to add NetCode for GameObjects support to Noble Connect.
Step 3: Check out the example scenes in "Assets/Noble Connect/NetCode for GameObjects/Examples" to get started.

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 06e66bd298fb6824b8c530a0da552ba3
timeCreated: 1552034575
licenseType: Store
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 078540d8d7d4dd644a7466811097da56
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: 272f780a0da55bb43a85079e5ba1969f
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 0
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,91 @@
# README
[
[**Website**](https://noblewhale.com)
|
[**Dashboard**](https://noblewhale.com/dashboard)
|
[**Docs**](https://noblewhale.com/docs)
|
[**FAQ**](https://noblewhale.com/faq)
|
[**Asset Store**](https://assetstore.unity.com/packages/tools/network/noble-connect-140535)
]
Adds relays and punchthrough to UNet or Mirror.
Guarantees your players can connect while reducing latency and saving you money by connecting players directly whenever possible.
Your players won't need to worry about forwarding ports or fiddling with router settings, they can just sit back, relax, and enjoy your beautiful game.
Supports Windows, Linux, OSX, Android, and iOS.
Supports:
* UNet
* Mirror with KCP, LiteNetLib, or Ignorance transports
* NetCode for GameObjects with UnityTransport
*Note: Web builds are not supported.*
# How to Use
In order to use the Noble Connect relay and punchthrough services you will need to sign up for an account. You can do this on our
website or through the Unity Engine at Window->Noble Connect->Setup. It is free to sign up but your CCU and bandwidth will be limited.
In order to raise the limits you will either need to purchase the Starter Pack or one of the monthly plans.
## Step 1 - Set up
1. You can access the setup window at any time by going to Window->Noble Connect->Setup.
2. Enter your email address to sign up, or enter your Game ID if you already have an account.
* You can get your Game ID any time from the dashboard at https://noblewhale.com/dashboard
3. Import the package for your networking system:
* If you are using Mirror, import the "Mirror Noble Connect.unitypackage"
* Make sure you have the correct version of Mirror imported first. Usually this means the latest from the Asset Store, but you can check the description on the [Noble Connect](https://assetstore.unity.com/packages/tools/network/noble-connect-140535) page to confirm.
* If you are using UNet, import the "UNet Noble Connect.unitypackage"
* In 2019.1 or later you must first install the "Multiplayer HLAPI" package from the Unity Package Manager
* If you are using NetCode for Gameobjects, import the "NetCode for GameObjects Noble Connect.unitypackage"
## Step 2 - Test it
1. Add the "Noble Connect/[UNet or Mirror or Netcode for GameObjects]/Examples/Network Manager/Network Manager Example.unity" scene to the build settings.
2. Build for your desired platform and run the build.
3. Click "Host" in the build.
* Note the IP and port that are displayed, this is the address that clients will use to connect to the host.
4. Run the Network Manager Example scene in the editor.
5. Click "Client" and then enter the ip and port from the host.
6. Click "Connect" to connect to the host.
* When the connection is complete you will see the connection type displayed on the client.
# Examples
Check out the Example scenes and scripts to see common ways to get connected. Each example includes a README file with more detailed instructions.
If you need any more information don't hesitate to contact us at nobleconnect@noblewhale.com
# What next?
Generally you should extend from the provided NobleNetworkManager.
If you prefer something a little lower level, you can also use the NobleServer and NobleClient classes directly to Listen() and Connect().
Most things will work exactly the same as you are used to if you are familiar with UNet, Mirror, or Netcode for GameObjects
**Note: For most methods that you override in NobleNetworkManager you will want to make sure to call the base method to avoid causing unexpected behaviour.**
# Notes for UNet / Mirror
The main difference is that you will use the NobleNetworkManager instead of Unity or Mirror's NetworkManager, or the NobleServer and NobleClient instead of Unity's or Mirror's NetworkServer and NetworkClient.
# Note for Netcode for GameObjects
Just make sure to use the NobleUnityTransport and you should be good to go.
# General Notes
The host will not know the address that clients should connect to until it has been assigned by the Noble Connect servers.
You will need to override the OnServerPrepared() method or use the OnServerPreparedCallback to know when this has happened and to get the hostAddress and hostPort (collectively known as the HostEndPoint)
that clients should use to connect to the host. This is generally when you would create a match if you're using a matchmaking system. You can also get
the HostEndPoint address any time after it has been assigned via NobleServer.HostEndPoint or NobleNetworkManager.HostEndPoint or NobleUnityTransport.HostRelayEndPoint
# Regions
By default the closest region will be selected automatically for relays. You can also manually select the region on the NobleNetworkManager or by passing in a GeographicRegion at runtime.
You can see this in any of the example scenes.
We have servers in the following regions:
* US_EAST - New York
* US_WEST - California
* EUROPE - Amsterdam
* AUSTRALIA - Sydney
* HONG_KONG - Hong Kong
* ASIA_PACIFIC - Singapore
* SOUTH_AMERICA - Brazil
* CHINE - China
# How it Works
Punchthrough and relays work according to the [ICE](https://tools.ietf.org/html/rfc5245), [TURN](https://tools.ietf.org/html/rfc5766), and [STUN](https://tools.ietf.org/html/rfc5389) specifications.

View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 662e06548d4295445bb8f66021012d93
timeCreated: 1552034575
licenseType: Store
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0154c6ffa997c574c9f0f2680c03e82f, type: 3}
m_Name: NobleConnectSettings
m_EditorClassIdentifier:
gameID: NDk4CmxvZ2Fuc2ltaWM0OUBnbWFpbC5jb20KSm1PNGNOenBFKzlIdC9yOE5pUWpLNGJYMmF5eFZ2N0hUYnJYanFuYUQwZnByaWFYQVg0U3h3V2FwSHFsOU1Lam5DOUQvT2tMVkY5UTRqOXFWODVYUkE9PQ==
relayServerPort: 3478

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8fa01c579d9dfd963a234ef28ea80a23
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -0,0 +1,2 @@
As of 2019.1 if you want to use UNet with Noble Connect you must install the HLAPI package from the Unity package manager
and then extract the "UNet Noble Connect" package to get the examples and scripts.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2a9d1538892d0bd418a62bf833d4e344
timeCreated: 1510044594
licenseType: Store
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

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

View File

@ -616,7 +616,8 @@ PlayerSettings:
webGLThreadsSupport: 0 webGLThreadsSupport: 0
webGLDecompressionFallback: 0 webGLDecompressionFallback: 0
webGLPowerPreference: 2 webGLPowerPreference: 2
scriptingDefineSymbols: {} scriptingDefineSymbols:
Standalone: NOBLE_CONNECT;NOBLE_CONNECT_1;NOBLE_CONNECT_1_37
additionalCompilerArguments: {} additionalCompilerArguments: {}
platformArchitecture: {} platformArchitecture: {}
scriptingBackend: {} scriptingBackend: {}

View File

@ -48,7 +48,7 @@ MonoBehaviour:
m_MinSize: {x: 300, y: 200} m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192} m_MaxSize: {x: 24288, y: 16192}
vertical: 0 vertical: 0
controlID: 72 controlID: 15
--- !u!114 &3 --- !u!114 &3
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -68,8 +68,8 @@ MonoBehaviour:
y: 0 y: 0
width: 454 width: 454
height: 928 height: 928
m_MinSize: {x: 275, y: 50} m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4000, y: 4000} m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 13} m_ActualView: {fileID: 13}
m_Panes: m_Panes:
- {fileID: 13} - {fileID: 13}
@ -223,7 +223,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 200} m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 16192, y: 16192} m_MaxSize: {x: 16192, y: 16192}
vertical: 1 vertical: 1
controlID: 73 controlID: 16
--- !u!114 &10 --- !u!114 &10
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -248,7 +248,7 @@ MonoBehaviour:
m_MinSize: {x: 200, y: 100} m_MinSize: {x: 200, y: 100}
m_MaxSize: {x: 16192, y: 8096} m_MaxSize: {x: 16192, y: 8096}
vertical: 0 vertical: 0
controlID: 74 controlID: 17
--- !u!114 &11 --- !u!114 &11
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 52 m_ObjectHideFlags: 52
@ -330,9 +330,9 @@ MonoBehaviour:
m_IsLocked: 0 m_IsLocked: 0
m_FolderTreeState: m_FolderTreeState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: c6660000 m_SelectedIDs: 76660000
m_LastClickedID: 26310 m_LastClickedID: 26230
m_ExpandedIDs: 000000006c66000000ca9a3b m_ExpandedIDs: 000000006266000000ca9a3b
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -360,7 +360,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: m_SelectedIDs:
m_LastClickedID: 0 m_LastClickedID: 0
m_ExpandedIDs: 000000006c660000 m_ExpandedIDs: 0000000062660000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -387,7 +387,7 @@ MonoBehaviour:
m_ListAreaState: m_ListAreaState:
m_SelectedInstanceIDs: m_SelectedInstanceIDs:
m_LastClickedInstanceID: 0 m_LastClickedInstanceID: 0
m_HadKeyboardFocusLastEvent: 1 m_HadKeyboardFocusLastEvent: 0
m_ExpandedInstanceIDs: c623000000000000 m_ExpandedInstanceIDs: c623000000000000
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
@ -488,9 +488,9 @@ MonoBehaviour:
m_SceneHierarchy: m_SceneHierarchy:
m_TreeViewState: m_TreeViewState:
scrollPos: {x: 0, y: 0} scrollPos: {x: 0, y: 0}
m_SelectedIDs: da670000 m_SelectedIDs:
m_LastClickedID: 26586 m_LastClickedID: 0
m_ExpandedIDs: c8f6ffff08f8ffff38fbffff18670000 m_ExpandedIDs: 44f4ffff86f4ffffeaf5fffff0f5ffffc4f7ffff06f8ffff6af9ffff70f9ffff38fbffff
m_RenameOverlay: m_RenameOverlay:
m_UserAcceptedRename: 0 m_UserAcceptedRename: 0
m_Name: m_Name:
@ -774,7 +774,7 @@ MonoBehaviour:
m_Position: m_Position:
m_Target: {x: 538.4778, y: 250.99454, z: 0} m_Target: {x: 538.4778, y: 250.99454, z: 0}
speed: 2 speed: 2
m_Value: {x: 538.4769, y: 250.99419, z: -0.000012519593} m_Value: {x: 538.4778, y: 250.99454, z: 0}
m_RenderMode: 0 m_RenderMode: 0
m_CameraMode: m_CameraMode:
drawMode: 0 drawMode: 0
@ -805,7 +805,7 @@ MonoBehaviour:
m_Fade: m_Fade:
m_Target: 0 m_Target: 0
speed: 2 speed: 2
m_Value: 1 m_Value: 0
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4} m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4}
m_Pivot: {x: 0, y: 0, z: 0} m_Pivot: {x: 0, y: 0, z: 0}
m_Size: {x: 1, y: 1} m_Size: {x: 1, y: 1}
@ -823,11 +823,11 @@ MonoBehaviour:
m_Rotation: m_Rotation:
m_Target: {x: 0, y: 0, z: 0, w: 1} m_Target: {x: 0, y: 0, z: 0, w: 1}
speed: 2 speed: 2
m_Value: {x: -0.00000023107182, y: 0.0000015522646, z: -0.0000005901495, w: -1} m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size: m_Size:
m_Target: 674.65393 m_Target: 674.65393
speed: 2 speed: 2
m_Value: 674.65283 m_Value: 674.65393
m_Ortho: m_Ortho:
m_Target: 1 m_Target: 1
speed: 2 speed: 2
@ -845,7 +845,7 @@ MonoBehaviour:
m_FarClip: 10000 m_FarClip: 10000
m_DynamicClip: 1 m_DynamicClip: 1
m_OcclusionCulling: 0 m_OcclusionCulling: 0
m_LastSceneViewRotation: {x: -0.12956645, y: 0.87038475, z: -0.33090827, w: -0.34079745} m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
m_LastSceneViewOrtho: 0 m_LastSceneViewOrtho: 0
m_ReplacementShader: {fileID: 0} m_ReplacementShader: {fileID: 0}
m_ReplacementString: m_ReplacementString: