├── .gitignore ├── Assets ├── IL2CPPCompatible.cs ├── IL2CPPCompatible.cs.meta ├── IL2CPPStudy.cs ├── IL2CPPStudy.cs.meta ├── Test.unity ├── Test.unity.meta ├── ThreadPoolTest.cs └── ThreadPoolTest.cs.meta └── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset /.gitignore: -------------------------------------------------------------------------------- 1 | iOS_Build 2 | Library 3 | Assembly-CSharp-vs.csproj 4 | Assembly-CSharp.csproj 5 | Unity_iOS64_Test-csharp.sln 6 | Unity_iOS64_Test.sln 7 | Unity_iOS64_Test.userprefs 8 | -------------------------------------------------------------------------------- /Assets/IL2CPPCompatible.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.IO; 4 | using System.Collections; 5 | using System.Threading; 6 | using System.Net.Sockets; 7 | using System.Net.Security; 8 | using System.Security.Authentication; 9 | using System.Security.Cryptography.X509Certificates; 10 | 11 | public class IL2CPPCompatible : MonoBehaviour { 12 | 13 | // Use this for initialization 14 | void Start () { 15 | ThreadPoolTest (); 16 | SSLAuthenticateTest (); 17 | } 18 | 19 | // Update is called once per frame 20 | void Update () { 21 | 22 | } 23 | 24 | void ThreadPoolTest() 25 | { 26 | ThreadPool.QueueUserWorkItem (new WaitCallback ((a) => { 27 | Debug.Log("Thread from tread pool started"); 28 | })); 29 | } 30 | 31 | void SSLAuthenticateTest() 32 | { 33 | var client = new TcpClient (); 34 | String hosturl = "115.239.211.112";//www.baidu.com; 35 | client.Connect (hosturl, 443); 36 | 37 | using (var stream = client.GetStream ()) 38 | { 39 | Debug.Log("CONNECTING "); 40 | var ostream = stream as Stream; 41 | if (true) 42 | { 43 | ostream = new SslStream (stream, false, new RemoteCertificateValidationCallback (ValidateServerCertificate)); 44 | 45 | 46 | try 47 | { 48 | var ssl = ostream as SslStream; 49 | ssl.AuthenticateAsClient (hosturl); 50 | } 51 | catch (Exception e) 52 | { 53 | Debug.Log ("Exception: " + e.Message); 54 | } 55 | } 56 | } 57 | } 58 | 59 | public static bool ValidateServerCertificate (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) 60 | { 61 | Debug.LogWarning ("SSL Cert Error:" + sslPolicyErrors.ToString ()); 62 | return true; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Assets/IL2CPPCompatible.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab57c90b18b0e4f4fa532eda49863e16 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/IL2CPPStudy.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.IO; 4 | using System.Threading; 5 | 6 | public class CoconutClassStudy 7 | { 8 | public int inta; 9 | public int intb; 10 | 11 | public int Add() 12 | { 13 | return inta + intb; 14 | } 15 | 16 | public CoconutClassStudy(int a, int b) 17 | { 18 | inta = a; 19 | intb = b; 20 | } 21 | 22 | public void IOTest(string filename) 23 | { 24 | if (File.Exists (filename)) { 25 | FileStream fs = File.Open(filename, FileMode.Create); 26 | fs.Close(); 27 | 28 | } 29 | } 30 | 31 | public void ThreadTest() 32 | { 33 | Thread a =new Thread(delegate(object state) { 34 | Debug.Log ("Thread Started"); 35 | }); 36 | 37 | a.Start (); 38 | } 39 | } 40 | 41 | 42 | public class IL2CPPStudy : MonoBehaviour { 43 | 44 | // Use this for initialization 45 | void Start () { 46 | Debug.Log (CoconutFuncStudy (10 , 20)); 47 | CoconutClassStudy cc = new CoconutClassStudy (50, 60); 48 | Debug.Log (cc.Add ()); 49 | cc.IOTest("test.txt"); 50 | cc.ThreadTest (); 51 | Debug.Log (cc.GetType ()); 52 | } 53 | 54 | // Update is called once per frame 55 | void Update () { 56 | 57 | } 58 | 59 | int CoconutFuncStudy(int a, int b) 60 | { 61 | return a + b; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Assets/IL2CPPStudy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21390b1b1e81d46cf803579ef39e5449 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Test.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/Assets/Test.unity -------------------------------------------------------------------------------- /Assets/Test.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 143320d2ee0f54df1ab32f77d680bffd 3 | DefaultImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/ThreadPoolTest.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.IO; 4 | using System.Collections; 5 | using System.Threading; 6 | using System.Net.Sockets; 7 | using System.Net.Security; 8 | using System.Security.Authentication; 9 | using System.Security.Cryptography.X509Certificates; 10 | 11 | public class ThreadPoolTest : MonoBehaviour 12 | { 13 | 14 | // Use this for initialization 15 | void Start () { 16 | Thread a =new Thread(delegate(object state) { 17 | Debug.Log ("+++++++QueueUserWorkItem+++++++"); 18 | }); 19 | 20 | a.Start (); 21 | 22 | var client = new TcpClient (); 23 | String hosturl = "https://cn.avoscloud.com/1"; 24 | client.Connect (hosturl, 443); 25 | 26 | using (var stream = client.GetStream ()) 27 | { 28 | //Debug.Log("CONNECTING "); 29 | var ostream = stream as Stream; 30 | if (true) { 31 | //ostream = new SslStream (stream, false, new RemoteCertificateValidationCallback (ValidateServerCertificate)); 32 | 33 | /* 34 | try { 35 | var ssl = ostream as SslStream; 36 | ssl.AuthenticateAsClient (hosturl); 37 | } catch (Exception e) { 38 | Debug.LogError ("Exception: " + e.Message); 39 | // return; 40 | } 41 | */ 42 | 43 | /* 44 | Debug.Log("CONNECTING.... "); 45 | var tlsClient = new LegacyTlsClient (new AlwaysValidVerifyer ()); 46 | var handler = new TlsProtocolHandler (ostream); 47 | handler.Connect (tlsClient); 48 | Debug.Log("CONNECTING End"); 49 | */ 50 | 51 | } 52 | } 53 | 54 | } 55 | 56 | public static bool ValidateServerCertificate (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) 57 | { 58 | Debug.LogWarning ("SSL Cert Error:" + sslPolicyErrors.ToString ()); 59 | return true; 60 | } 61 | 62 | // Update is called once per frame 63 | void Update () { 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Assets/ThreadPoolTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a7baea041bb64c8fa974211ec6d190d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CoconutIslandStudio/IL2CPP_Test/f7d97f49f6742f37e3d3a77a2e570cd50e596280/ProjectSettings/TimeManager.asset --------------------------------------------------------------------------------