add
This commit is contained in:
108
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsExample.cs
Executable file
108
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsExample.cs
Executable file
@@ -0,0 +1,108 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class AndroidHttpsExample : MonoBehaviour
|
||||
{
|
||||
private bool mInitialized = false;
|
||||
|
||||
private string mResponse = "";
|
||||
|
||||
void Awake()
|
||||
{
|
||||
|
||||
//content of your *.crt file
|
||||
string cert1 =
|
||||
@"-----BEGIN CERTIFICATE-----
|
||||
MIIDjzCCAncCBFalunUwDQYJKoZIhvcNAQELBQAwgYsxCzAJBgNVBAYTAk5aMRIw
|
||||
EAYDVQQIEwlTb3V0aGxhbmQxDTALBgNVBAcTBEdvcmUxGDAWBgNVBAoTD2JlY2F1
|
||||
c2Ugd2h5IG5vdDEgMB4GA1UEAxMXbHV6LmJlY2F1c2Utd2h5LW5vdC5jb20xHTAb
|
||||
BgkqhkiG9w0BCQEWDmRldmx1ekBsaXZlLmRlMB4XDTE2MDEyNTA2MDIyOVoXDTE3
|
||||
MDEyNDA2MDIyOVowgYsxCzAJBgNVBAYTAk5aMRIwEAYDVQQIEwlTb3V0aGxhbmQx
|
||||
DTALBgNVBAcTBEdvcmUxGDAWBgNVBAoTD2JlY2F1c2Ugd2h5IG5vdDEgMB4GA1UE
|
||||
AxMXbHV6LmJlY2F1c2Utd2h5LW5vdC5jb20xHTAbBgkqhkiG9w0BCQEWDmRldmx1
|
||||
ekBsaXZlLmRlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6BgkxEBX
|
||||
G4QZHx+6fm/QhB1nADl94K6SDZp+XJ3HU1BkHJz6hWLungkOF4secJ3Tkmmt4hUq
|
||||
eS8mafambYBKPve/8HoTaVugaji1WN9tmm6XeMoeAu4012bThVXgQHQiOFNjIA6Z
|
||||
y46AHR+DbeKNI7z83BMSx8x73YjyRXHGHPZDGycltqiBNga8xtTLRvMJFTV5LXA4
|
||||
whSOLJcMoqU1TtmjO1jjrzWPoN6Bxe/7vswJibpCjZ6BrQ0XXtxCMjLMfHBzmBxR
|
||||
eiKmk8onWg/57ipgYqDLCQGBIEwr+1PMZJ0MLHuAGwIsMEV9IzoKOk1N81JH4m6r
|
||||
IgaTPG2RE76tUQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQA1LnISPPcplCS+n1WE
|
||||
Ab38WpKi0TRkhBkn1u9cJCLK49I78ShhoA47GtoTDkK89u3TAou8dOXgovQmk65w
|
||||
NfCsxZfgJo3Rt/v0Gi8YeBTSBHFIak+FTBmKP7hj0hKVuqYgYrqjEIVB8YxPcz4l
|
||||
wJLM3SRdPPeHFTde905RsyFDEseXXOFwOa4kOC0Z4DPe9dnedTtWd7SR1kf2HsJW
|
||||
QmZSCmlYHm0fydoM9lbipStep2rqxydcPXYmRxONSY+bnsoL9BDsqi5w6Atph2wa
|
||||
kfH/nMH44v07JPVpWHjf3qnDgy7u9ygj+AGJ8AvHKFK2Rvs2q6v/rLUpBCHd2GeB
|
||||
lumP
|
||||
-----END CERTIFICATE-----";
|
||||
|
||||
AndroidHttpsHelper.AddCertificate(cert1);
|
||||
mInitialized = true;
|
||||
}
|
||||
|
||||
// Use this for initialization
|
||||
void Start ()
|
||||
{
|
||||
if(mInitialized == false)
|
||||
{
|
||||
Debug.LogError("Initialization failed. Default WWW class is used.");
|
||||
}
|
||||
|
||||
//if this fails I might have changed my domain again ... sorry about that!
|
||||
//self certified
|
||||
//call this with your domain and a file to download
|
||||
//(don't forget to call AndroidHttpsHelper.AddCertificate with your .crt file before this)
|
||||
StartCoroutine(Download("https://luz.because-why-not.com/anothertest.txt"));
|
||||
|
||||
//making sure the certified urls still work:
|
||||
StartCoroutine(Download("https://google.com"));
|
||||
}
|
||||
|
||||
IEnumerator Download(string url)
|
||||
{
|
||||
WWW wwwget = new WWW(url);
|
||||
yield return wwwget;
|
||||
|
||||
mResponse += "URL: " + url;
|
||||
if (!string.IsNullOrEmpty(wwwget.error))
|
||||
{
|
||||
mResponse += "\n<color=#FF0000>Error: " + wwwget.error + "</color>";
|
||||
mResponse += "\nResponse: " + wwwget.text;
|
||||
}else
|
||||
{
|
||||
string response = wwwget.text;
|
||||
if (response.Length > 200)
|
||||
response = response.Substring(0, 200);
|
||||
mResponse += "\n<color=#00FF00>Connection successfull!</color> ";
|
||||
mResponse += "\nResponse: " + response;
|
||||
}
|
||||
|
||||
mResponse += "\n\n";
|
||||
}
|
||||
|
||||
private void OnGUI()
|
||||
{
|
||||
GUILayout.BeginVertical();
|
||||
if (mInitialized)
|
||||
{
|
||||
GUILayout.Label("Plugin initialized.");
|
||||
}else
|
||||
{
|
||||
GUILayout.Label("Failed to initialize the plugin.");
|
||||
}
|
||||
|
||||
if (mResponse == null)
|
||||
{
|
||||
GUILayout.Label("No server response.");
|
||||
}
|
||||
else
|
||||
{
|
||||
GUILayout.Label(mResponse);
|
||||
}
|
||||
GUILayout.EndVertical();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
|
||||
}
|
||||
}
|
||||
12
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsExample.cs.meta
Executable file
12
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsExample.cs.meta
Executable file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87e90fe17df37b24fa9bbd35380dad36
|
||||
timeCreated: 1433639489
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
51
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsHelper.cs
Executable file
51
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsHelper.cs
Executable file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
/// <summary>
|
||||
/// Use AndroidHttpsHelper.AddCertificate with the content of your .cert file to allow access to your HTTPS page
|
||||
/// using Unity's the WWW class.
|
||||
///
|
||||
///
|
||||
/// </summary>
|
||||
public class AndroidHttpsHelper
|
||||
{
|
||||
private static readonly string JAVA_CLASS_NAME = "co.fourscience.androidhttpsplugin.AndroidHttps";
|
||||
|
||||
public static void IgnoreCertificates()
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
AndroidJavaClass clsJavaSSLHelper = new AndroidJavaClass(JAVA_CLASS_NAME);
|
||||
clsJavaSSLHelper.CallStatic("ignoreCertifcates");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void TrustOnly(String certFileContent)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
AndroidJavaClass clsJavaSSLHelper = new AndroidJavaClass(JAVA_CLASS_NAME);
|
||||
byte[] certBytes = System.Text.Encoding.ASCII.GetBytes(certFileContent);
|
||||
clsJavaSSLHelper.CallStatic("trustOnly", certBytes);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void AddCertificate(String certFileContent)
|
||||
{
|
||||
#if UNITY_ANDROID
|
||||
if (Application.platform == RuntimePlatform.Android)
|
||||
{
|
||||
AndroidJavaClass clsJavaSSLHelper = new AndroidJavaClass(JAVA_CLASS_NAME);
|
||||
byte[] certBytes = System.Text.Encoding.ASCII.GetBytes(certFileContent);
|
||||
clsJavaSSLHelper.CallStatic("addCertificate", certBytes);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
12
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsHelper.cs.meta
Executable file
12
Assets/CoolapeFrame/3rd/AndroidHttpHelper/AndroidHttpsHelper.cs.meta
Executable file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2fbf115746035d4ead6bc9c5a2ba572
|
||||
timeCreated: 1433722763
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/CoolapeFrame/3rd/AndroidHttpHelper/Plugins.meta
Normal file
9
Assets/CoolapeFrame/3rd/AndroidHttpHelper/Plugins.meta
Normal file
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5776c7c5f621b4bbabdbd6033cae1d00
|
||||
folderAsset: yes
|
||||
timeCreated: 1507720887
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 323266c9d5372454da1db69b9e1b9cdd
|
||||
folderAsset: yes
|
||||
timeCreated: 1507720902
|
||||
licenseType: Pro
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/CoolapeFrame/3rd/AndroidHttpHelper/Plugins/Android/AndroidHttpsHelper.jar
Executable file
BIN
Assets/CoolapeFrame/3rd/AndroidHttpHelper/Plugins/Android/AndroidHttpsHelper.jar
Executable file
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 84d24131502478a4da8690bb21e7ea10
|
||||
timeCreated: 1433731697
|
||||
licenseType: Free
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
Android: Android
|
||||
second:
|
||||
enabled: 1
|
||||
settings: {}
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
DefaultValueInitialized: true
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
115
Assets/CoolapeFrame/3rd/AndroidHttpHelper/Readme.txt
Normal file
115
Assets/CoolapeFrame/3rd/AndroidHttpHelper/Readme.txt
Normal file
@@ -0,0 +1,115 @@
|
||||
http://luz.because-why-not.com/unity-android-and-ssl-sslhandshakeexceptioncertpathvalidatorexception/
|
||||
|
||||
================================================================================================
|
||||
Disclaimer: This post won’t make any sense to you if you don’t understand what Unity, Android or SSL is 😉
|
||||
|
||||
Most of the time I enjoy working with Unity as most tasks on it are fast and easy. But if something doesn’t work immediately then it subsequently gets messy and involves a lot of own work.
|
||||
|
||||
My current example is the WWW class. It is used to receive data from web servers using HTTP or HTTPS. I am using HTTPS to make sure that the data transfer is encrypted and people can’t cheat (as easily). This worked fine until I created an Android version. My app reported it can’t connect to the server. The reason was:
|
||||
|
||||
|
||||
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
|
||||
1
|
||||
javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
|
||||
The exception means that Android rejected my server’s SSL certificate as I signed it myself instead of buying one from a big trusted certificate authority.
|
||||
|
||||
And here is where Unity gets annoying. Instead of ensuring that the WWW class behaves the same on all platforms they simply go with the default behavior of each platform without documenting anything. While my application works fine on other platforms it can’t work on Android as the WWW class uses the Android class “HTTPSUrlConnection” which enforces by default that every certificate has to be from a trustworthy CA. Fortunately, there is a way to solve this problem.
|
||||
|
||||
|
||||
|
||||
The WWW class uses the default SSLContext/TrustManager to check if the certificate can be trusted. Android allows you to change the default system thus you can change the behaviour of Unitys class by changing the underlying HTTPSUrlConnection.
|
||||
|
||||
The following method replaces the default TrustManager with a new one that will accept the given certificate. It is written in java and has to be included in unity as an Android Plugin.
|
||||
|
||||
|
||||
public static void trust(byte[] crtFileContent)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Load CAs from an InputStream
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
|
||||
InputStream caInput = new BufferedInputStream(new ByteArrayInputStream(crtFileContent));
|
||||
Certificate ca;
|
||||
try {
|
||||
ca = cf.generateCertificate(caInput);
|
||||
Log.d("JavaSSLHelper", "ca=" + ((X509Certificate) ca).getSubjectDN());
|
||||
Log.d("JavaSSLHelper", "Certificate successfully created");
|
||||
} finally
|
||||
{
|
||||
caInput.close();
|
||||
}
|
||||
|
||||
// Create a KeyStore containing our trusted CAs
|
||||
String keyStoreType = KeyStore.getDefaultType();
|
||||
KeyStore keyStore = KeyStore.getInstance(keyStoreType);
|
||||
keyStore.load(null, null);
|
||||
keyStore.setCertificateEntry("ca", ca);
|
||||
|
||||
// Create a TrustManager that trusts the CAs in our KeyStore
|
||||
String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();
|
||||
TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);
|
||||
tmf.init(keyStore);
|
||||
|
||||
try
|
||||
{
|
||||
// Create an SSLContext that uses our TrustManager
|
||||
SSLContext context = SSLContext.getInstance("TLS");
|
||||
context.init(null, tmf.getTrustManagers(), null);
|
||||
|
||||
//this is important: unity will use the default ssl socket factory we just created
|
||||
HttpsURLConnection.setDefaultSSLSocketFactory(context.getSocketFactory());
|
||||
Log.d("JavaSSLHelper", "Default SSL Socket set.");
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (KeyManagementException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}catch(Exception e)
|
||||
{
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Now, it can be used directly in C# with the following lines:
|
||||
|
||||
|
||||
string cert = @"-----BEGIN CERTIFICATE-----
|
||||
MIICIzCCAYwCCQDMITtroXuUfzANBgkqhkiG9w0BAQUFADBWMQswCQYDVQQGEwJO
|
||||
WjESMBAGA1UECAwJU291dGhsYW5kMQ0wCwYDVQQHDARHb3JlMREwDwYDVQQKDAg0
|
||||
c2NpZW5jZTERMA8GA1UEAwwINHNjaWVuY2UwHhcNMTUwMjIyMDczMzI1WhcNMTYw
|
||||
MjIyMDczMzI1WjBWMQswCQYDVQQGEwJOWjESMBAGA1UECAwJU291dGhsYW5kMQ0w
|
||||
CwYDVQQHDARHb3JlMREwDwYDVQQKDAg0c2NpZW5jZTERMA8GA1UEAwwINHNjaWVu
|
||||
Y2UwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAO5VE64yagrFbU2PTL6b9aQD
|
||||
vGJc5Ks5tm4Ipkm1+MPhjUv2h/RyoihrkkLnhm85KkNZbNSEib98XWb6iooJaTj3
|
||||
LgBvr071nhgq1s0q/PYClTFwOvgbh40gvE8PsVLum/vRj0t+lq+jI4nlMER9qkCw
|
||||
0Hy6DyTaL2DVXZTkAL5tAgMBAAEwDQYJKoZIhvcNAQEFBQADgYEAL4KfbLqKh62X
|
||||
3QLEeBtvzhqPQJ6gmJSIi4wxzk582UmnXI5iwLCCIvM62MiBfk6wlD5yqkD3VWwz
|
||||
fzhyyspGWZHjJn/AkCj4/7f28qsMtx1OId+hcomd3QGxBDd6jXa5Wq4gjun5yb/A
|
||||
qbKmnda0rnh9P7lWbcLwwhqIFUQUuis=
|
||||
-----END CERTIFICATE-----
|
||||
";
|
||||
|
||||
AndroidJavaClass clsJavaSSLHelper = new AndroidJavaClass("co.fourscience.ulib.JavaSSLHelper");
|
||||
byte[] certBytes = System.Text.Encoding.ASCII.GetBytes(cert);
|
||||
clsJavaSSLHelper.CallStatic("trust", certBytes);
|
||||
The variable “cert” is simply the content of the “crt” file of the certificate you use. The last line calls the static java method shown above. After this call all calls of WWW will use the new TrustManager and thus accept the given certificate.
|
||||
|
||||
|
||||
|
||||
Edit:
|
||||
You can download the finished Android plugin here. It is a jar file containing the JavaSSLHelper class. Simply put the file into your Asset/Plugins/Android folder and use the C# code above with your own certificate to allow android to access it. (use the file at your own risk! )
|
||||
|
||||
Edit2: I created a proper plugin based on this solution. It will allow you to declare your own certificate as trustworthy without removing the default Android behaviour involving other HTTPS pages. (The old version allowed ONLY the given certificate and blocked all other pages)
|
||||
|
||||
You can download the newest version here.
|
||||
|
||||
Update 25-01-2016: Changed the example to my new url + new certificate
|
||||
|
||||
Source: github unity-android-ssl
|
||||
|
||||
BTW: Since December 2015 Mozilla’s project “lets encrypt ” is in open beta. There you can get real trusted certificates for free. At least my current Android version recognizes the certificate as trustworthy! So you don’t need the plugin anymore.
|
||||
|
||||
More at https://letsencrypt.org.
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 49113ad5521014f219e096f2ecd3fcbb
|
||||
timeCreated: 1507720932
|
||||
licenseType: Pro
|
||||
TextScriptImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
350
Assets/CoolapeFrame/3rd/AndroidHttpHelper/examplescene.unity
Normal file
350
Assets/CoolapeFrame/3rd/AndroidHttpHelper/examplescene.unity
Normal file
@@ -0,0 +1,350 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &4
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 0
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 1024
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 1
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 0
|
||||
--- !u!196 &5
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &415266660
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 415266665}
|
||||
- component: {fileID: 415266664}
|
||||
- component: {fileID: 415266662}
|
||||
- component: {fileID: 415266661}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &415266661
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 415266660}
|
||||
m_Enabled: 1
|
||||
--- !u!124 &415266662
|
||||
Behaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 415266660}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &415266664
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 415266660}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0.019607844}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 0
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &415266665
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 415266660}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 1, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1054274071
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1054274073}
|
||||
- component: {fileID: 1054274072}
|
||||
m_Layer: 0
|
||||
m_Name: Example
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1054274072
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1054274071}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 87e90fe17df37b24fa9bbd35380dad36, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &1054274073
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1054274071}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1893971614
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1893971616}
|
||||
- component: {fileID: 1893971615}
|
||||
m_Layer: 0
|
||||
m_Name: Directional Light
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!108 &1893971615
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1893971614}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 10
|
||||
m_Type: 1
|
||||
m_Shape: 0
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_InnerSpotAngle: 21.802082
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_CullingMatrixOverride:
|
||||
e00: 1
|
||||
e01: 0
|
||||
e02: 0
|
||||
e03: 0
|
||||
e10: 0
|
||||
e11: 1
|
||||
e12: 0
|
||||
e13: 0
|
||||
e20: 0
|
||||
e21: 0
|
||||
e22: 1
|
||||
e23: 0
|
||||
e30: 0
|
||||
e31: 0
|
||||
e32: 0
|
||||
e33: 1
|
||||
m_UseCullingMatrixOverride: 0
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingLayerMask: 1
|
||||
m_Lightmapping: 4
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_UseBoundingSphereOverride: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &1893971616
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1893971614}
|
||||
m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605}
|
||||
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3062b09755918743af4221d41a62f02
|
||||
timeCreated: 1433638770
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user