├── .gitignore ├── Assets ├── Example.meta ├── Example │ ├── console.unity │ └── console.unity.meta ├── ThirdParty.meta └── ThirdParty │ ├── IngameDebugConsole.meta │ ├── IngameDebugConsole │ ├── Android.meta │ ├── Android │ │ ├── IngameDebugConsole.aar │ │ └── IngameDebugConsole.aar.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── IngameDebugConsole.prefab │ │ └── IngameDebugConsole.prefab.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── ConsoleMethodAttribute.cs │ │ ├── ConsoleMethodAttribute.cs.meta │ │ ├── DebugLogConsole.cs │ │ ├── DebugLogConsole.cs.meta │ │ ├── DebugLogEntry.cs │ │ ├── DebugLogEntry.cs.meta │ │ ├── DebugLogIndexList.cs │ │ ├── DebugLogIndexList.cs.meta │ │ ├── DebugLogItem.cs │ │ ├── DebugLogItem.cs.meta │ │ ├── DebugLogLogcatListener.cs │ │ ├── DebugLogLogcatListener.cs.meta │ │ ├── DebugLogManager.cs │ │ ├── DebugLogManager.cs.meta │ │ ├── DebugLogPopup.cs │ │ ├── DebugLogPopup.cs.meta │ │ ├── DebugLogRecycledListView.cs │ │ ├── DebugLogRecycledListView.cs.meta │ │ ├── DebugsOnScrollListener.cs │ │ ├── DebugsOnScrollListener.cs.meta │ │ ├── GestureAround.cs │ │ └── GestureAround.cs.meta │ ├── Sprites.meta │ └── Sprites │ │ ├── IconClear.psd │ │ ├── IconClear.psd.meta │ │ ├── IconCollapse.psd │ │ ├── IconCollapse.psd.meta │ │ ├── IconError.psd │ │ ├── IconError.psd.meta │ │ ├── IconHide.psd │ │ ├── IconHide.psd.meta │ │ ├── IconInfo.psd │ │ ├── IconInfo.psd.meta │ │ ├── IconResize.psd │ │ ├── IconResize.psd.meta │ │ ├── IconSnapToBottom.psd │ │ ├── IconSnapToBottom.psd.meta │ │ ├── IconSnapToBottomBg.psd │ │ ├── IconSnapToBottomBg.psd.meta │ │ ├── IconWarning.psd │ │ ├── IconWarning.psd.meta │ │ ├── SlicedBackground.psd │ │ ├── SlicedBackground.psd.meta │ │ ├── SlicedBackground2.psd │ │ ├── SlicedBackground2.psd.meta │ │ ├── SlicedBackground3.psd │ │ ├── SlicedBackground3.psd.meta │ │ ├── Unused.meta │ │ └── Unused │ │ ├── IconErrorHighRes.psd │ │ ├── IconErrorHighRes.psd.meta │ │ ├── IconInfoHighRes.psd │ │ ├── IconInfoHighRes.psd.meta │ │ ├── IconWarningHighRes.psd │ │ └── IconWarningHighRes.psd.meta │ ├── XLua.meta │ └── XLua │ ├── Plugins.meta │ ├── Plugins │ ├── Android.meta │ ├── Android │ │ ├── libs.meta │ │ └── libs │ │ │ ├── armeabi-v7a.meta │ │ │ ├── armeabi-v7a │ │ │ ├── libxlua.so │ │ │ └── libxlua.so.meta │ │ │ ├── x86.meta │ │ │ └── x86 │ │ │ ├── libxlua.so │ │ │ └── libxlua.so.meta │ ├── WSA.meta │ ├── WSA │ │ ├── ARM.meta │ │ ├── ARM │ │ │ ├── xlua.dll │ │ │ └── xlua.dll.meta │ │ ├── x64.meta │ │ ├── x64 │ │ │ ├── xlua.dll │ │ │ └── xlua.dll.meta │ │ ├── x86.meta │ │ └── x86 │ │ │ ├── xlua.dll │ │ │ └── xlua.dll.meta │ ├── WebGL.meta │ ├── WebGL │ │ ├── xlua_webgl.cpp │ │ └── xlua_webgl.cpp.meta │ ├── iOS.meta │ ├── iOS │ │ ├── HotfixFlags.cpp │ │ ├── HotfixFlags.cpp.meta │ │ ├── libxlua.a │ │ └── libxlua.a.meta │ ├── x86.meta │ ├── x86 │ │ ├── libxlua.so │ │ ├── libxlua.so.meta │ │ ├── xlua.dll │ │ └── xlua.dll.meta │ ├── x86_64.meta │ ├── x86_64 │ │ ├── libxlua.so │ │ ├── libxlua.so.meta │ │ ├── xlua.dll │ │ └── xlua.dll.meta │ ├── xlua.bundle.meta │ └── xlua.bundle │ │ ├── Contents.meta │ │ └── Contents │ │ ├── Info.plist │ │ ├── Info.plist.meta │ │ ├── MacOS.meta │ │ └── MacOS │ │ ├── xlua │ │ └── xlua.meta │ ├── Src.meta │ └── Src │ ├── CodeEmit.cs │ ├── CodeEmit.cs.meta │ ├── CopyByValue.cs │ ├── CopyByValue.cs.meta │ ├── DelegateBridge.cs │ ├── DelegateBridge.cs.meta │ ├── Editor.meta │ ├── Editor │ ├── Generator.cs │ ├── Generator.cs.meta │ ├── Hotfix.cs │ ├── Hotfix.cs.meta │ ├── LinkXmlGen.meta │ ├── LinkXmlGen │ │ ├── LinkXmlGen.cs │ │ ├── LinkXmlGen.cs.meta │ │ ├── LinkXmlGen.tpl.txt │ │ └── LinkXmlGen.tpl.txt.meta │ ├── Template.meta │ ├── Template │ │ ├── LuaClassWrap.tpl.txt │ │ ├── LuaClassWrap.tpl.txt.meta │ │ ├── LuaClassWrapGCM.tpl.txt │ │ ├── LuaClassWrapGCM.tpl.txt.meta │ │ ├── LuaDelegateBridge.tpl.txt │ │ ├── LuaDelegateBridge.tpl.txt.meta │ │ ├── LuaDelegateWrap.tpl.txt │ │ ├── LuaDelegateWrap.tpl.txt.meta │ │ ├── LuaEnumWrap.tpl.txt │ │ ├── LuaEnumWrap.tpl.txt.meta │ │ ├── LuaEnumWrapGCM.tpl.txt │ │ ├── LuaEnumWrapGCM.tpl.txt.meta │ │ ├── LuaInterfaceBridge.tpl.txt │ │ ├── LuaInterfaceBridge.tpl.txt.meta │ │ ├── LuaRegister.tpl.txt │ │ ├── LuaRegister.tpl.txt.meta │ │ ├── LuaRegisterGCM.tpl.txt │ │ ├── LuaRegisterGCM.tpl.txt.meta │ │ ├── LuaWrapPusher.tpl.txt │ │ ├── LuaWrapPusher.tpl.txt.meta │ │ ├── PackUnpack.tpl.txt │ │ ├── PackUnpack.tpl.txt.meta │ │ ├── TemplateCommon.lua.txt │ │ └── TemplateCommon.lua.txt.meta │ ├── TemplateRef.cs │ └── TemplateRef.cs.meta │ ├── GenAttributes.cs │ ├── GenAttributes.cs.meta │ ├── InternalGlobals.cs │ ├── InternalGlobals.cs.meta │ ├── LuaBase.cs │ ├── LuaBase.cs.meta │ ├── LuaDLL.cs │ ├── LuaDLL.cs.meta │ ├── LuaEnv.cs │ ├── LuaEnv.cs.meta │ ├── LuaException.cs │ ├── LuaException.cs.meta │ ├── LuaFunction.cs │ ├── LuaFunction.cs.meta │ ├── LuaTable.cs │ ├── LuaTable.cs.meta │ ├── MethodWarpsCache.cs │ ├── MethodWarpsCache.cs.meta │ ├── ObjectCasters.cs │ ├── ObjectCasters.cs.meta │ ├── ObjectPool.cs │ ├── ObjectPool.cs.meta │ ├── ObjectTranslator.cs │ ├── ObjectTranslator.cs.meta │ ├── ObjectTranslatorPool.cs │ ├── ObjectTranslatorPool.cs.meta │ ├── RawObject.cs │ ├── RawObject.cs.meta │ ├── SignatureLoader.cs │ ├── SignatureLoader.cs.meta │ ├── StaticLuaCallbacks.cs │ ├── StaticLuaCallbacks.cs.meta │ ├── TemplateEngine.meta │ ├── TemplateEngine │ ├── TemplateEngine.cs │ └── TemplateEngine.cs.meta │ ├── TypeExtensions.cs │ ├── TypeExtensions.cs.meta │ ├── Utils.cs │ └── Utils.cs.meta ├── LICENSE ├── LibSource ├── AAR Source (Android) │ ├── AndroidManifest.xml │ ├── LogcatLogReceiver.java │ └── LogcatLogger.java └── Images │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ └── 6.png ├── README.md └── UnityPackageManager └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.gitignore.io/api/unity,monodevelop,visualstudio 3 | 4 | ### Unity ### 5 | [Ll]ibrary/ 6 | [Tt]emp/ 7 | [Tt]arget/ 8 | [Oo]bj/ 9 | [Bb]uild/ 10 | [Bb]uilds/ 11 | Assets/AssetStoreTools* 12 | 13 | # Autogenerated VS/MD solution and project files 14 | ExportedObj/ 15 | *.csproj 16 | *.unityproj 17 | *.sln 18 | *.suo 19 | *.tmp 20 | *.user 21 | *.userprefs 22 | *.pidb 23 | *.booproj 24 | *.svd 25 | *.swp 26 | *.ipa 27 | *.apk 28 | *.zip 29 | 30 | # Unity3D generated meta files 31 | *.pidb.meta 32 | 33 | # Unity3D Generated File On Crash Reports 34 | sysinfo.txt 35 | 36 | 37 | ### MonoDevelop ### 38 | #User Specific 39 | *.userprefs 40 | *.usertasks 41 | 42 | #Mono Project Files 43 | *.pidb 44 | *.resources 45 | test-results/ 46 | 47 | 48 | ### VisualStudio ### 49 | ## Ignore Visual Studio temporary files, build results, and 50 | ## files generated by popular Visual Studio add-ons. 51 | 52 | # User-specific files 53 | *.suo 54 | *.user 55 | *.userosscache 56 | *.sln.docstates 57 | .vs 58 | 59 | # User-specific files (MonoDevelop/Xamarin Studio) 60 | *.userprefs 61 | /ProjectSettings 62 | -------------------------------------------------------------------------------- /Assets/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 125d323c7b80a564b988d124255ef442 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Example/console.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 519c01da98f89dd40aeb03065f1dee79 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ThirdParty.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0f7129ac6f6693499eb3ac2b9138fea 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c57523b63ddb094b835b6613da12763 3 | folderAsset: yes 4 | timeCreated: 1465915359 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d7d7a61a5341904eb3c65af025b1d86 3 | folderAsset: yes 4 | timeCreated: 1510075633 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Android/IngameDebugConsole.aar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Android/IngameDebugConsole.aar -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Android/IngameDebugConsole.aar.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf909fab1c14af446b0a854de42289b2 3 | timeCreated: 1510086220 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Android: Android 15 | second: 16 | enabled: 1 17 | settings: {} 18 | data: 19 | first: 20 | Any: 21 | second: 22 | enabled: 0 23 | settings: {} 24 | data: 25 | first: 26 | Editor: Editor 27 | second: 28 | enabled: 0 29 | settings: 30 | DefaultValueInitialized: true 31 | userData: 32 | assetBundleName: 33 | assetBundleVariant: 34 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7dbc36665bc0d684db9a4447e27a7a4b 3 | folderAsset: yes 4 | timeCreated: 1520417401 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Prefabs/IngameDebugConsole.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67117722a812a2e46ab8cb8eafbf5f5e 3 | timeCreated: 1466014755 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 860c08388401a6d4e858fe4910ea9337 3 | folderAsset: yes 4 | timeCreated: 1465930645 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace IngameDebugConsole 4 | { 5 | [AttributeUsage( AttributeTargets.Method, Inherited = false, AllowMultiple = true )] 6 | public class ConsoleMethodAttribute : Attribute 7 | { 8 | private string m_command; 9 | private string m_description; 10 | 11 | public string Command { get { return m_command; } } 12 | public string Description { get { return m_description; } } 13 | 14 | public ConsoleMethodAttribute( string command, string description ) 15 | { 16 | m_command = command; 17 | m_description = description; 18 | } 19 | } } -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/ConsoleMethodAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 324bb39c0bff0f74fa42f83e91f07e3a 3 | timeCreated: 1520710946 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogConsole.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d15693a03d0d33b4892c6365a2a97e19 3 | timeCreated: 1472036503 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogEntry.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | // Container for a simple debug entry 4 | namespace IngameDebugConsole 5 | { 6 | public class DebugLogEntry : System.IEquatable 7 | { 8 | private const int HASH_NOT_CALCULATED = -623218; 9 | 10 | public string logString; 11 | public string stackTrace; 12 | 13 | private string completeLog = null; 14 | 15 | // Sprite to show with this entry 16 | public Sprite logTypeSpriteRepresentation; 17 | 18 | // Collapsed count 19 | public int count; 20 | 21 | private int hashValue = HASH_NOT_CALCULATED; 22 | 23 | public DebugLogEntry( string logString, string stackTrace, Sprite sprite ) 24 | { 25 | this.logString = logString; 26 | this.stackTrace = stackTrace; 27 | 28 | logTypeSpriteRepresentation = sprite; 29 | 30 | count = 1; 31 | } 32 | 33 | // Check if two entries have the same origin 34 | public bool Equals( DebugLogEntry other ) 35 | { 36 | return this.logString == other.logString && this.stackTrace == other.stackTrace; 37 | } 38 | 39 | // Return a string containing complete information about this debug entry 40 | public override string ToString() 41 | { 42 | if( completeLog == null ) 43 | completeLog = string.Concat( logString, "\n", stackTrace ); 44 | 45 | return completeLog; 46 | } 47 | 48 | // Credit: https://stackoverflow.com/a/19250516/2373034 49 | public override int GetHashCode() 50 | { 51 | if( hashValue == HASH_NOT_CALCULATED ) 52 | { 53 | unchecked 54 | { 55 | hashValue = 17; 56 | hashValue = hashValue * 23 + logString == null ? 0 : logString.GetHashCode(); 57 | hashValue = hashValue * 23 + stackTrace == null ? 0 : stackTrace.GetHashCode(); 58 | } 59 | } 60 | 61 | return hashValue; 62 | } 63 | } 64 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogEntry.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7b1a420c564be040bf73b8a377fc2c2 3 | timeCreated: 1466375168 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogIndexList.cs: -------------------------------------------------------------------------------- 1 | namespace IngameDebugConsole 2 | { 3 | public class DebugLogIndexList 4 | { 5 | private int[] indices; 6 | private int size; 7 | 8 | public int Count { get { return size; } } 9 | public int this[int index] { get { return indices[index]; } } 10 | 11 | public DebugLogIndexList() 12 | { 13 | indices = new int[64]; 14 | size = 0; 15 | } 16 | 17 | public void Add( int index ) 18 | { 19 | if( size == indices.Length ) 20 | { 21 | int[] indicesNew = new int[size * 2]; 22 | System.Array.Copy( indices, 0, indicesNew, 0, size ); 23 | indices = indicesNew; 24 | } 25 | 26 | indices[size++] = index; 27 | } 28 | 29 | public void Clear() 30 | { 31 | size = 0; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogIndexList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37c6c91e5bfac6f499698c03f593bcbb 3 | timeCreated: 1520627934 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogItem.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using UnityEngine.EventSystems; 4 | #if UNITY_EDITOR 5 | using UnityEditor; 6 | using System.Text.RegularExpressions; 7 | #endif 8 | 9 | // A UI element to show information about a debug entry 10 | namespace IngameDebugConsole 11 | { 12 | public class DebugLogItem : MonoBehaviour, IPointerClickHandler 13 | { 14 | // Cached components 15 | [SerializeField] 16 | private RectTransform transformComponent; 17 | public RectTransform Transform { get { return transformComponent; } } 18 | 19 | [SerializeField] 20 | private Image imageComponent; 21 | public Image Image { get { return imageComponent; } } 22 | 23 | [SerializeField] 24 | private Text logText; 25 | [SerializeField] 26 | private Image logTypeImage; 27 | 28 | // Objects related to the collapsed count of the debug entry 29 | [SerializeField] 30 | private GameObject logCountParent; 31 | [SerializeField] 32 | private Text logCountText; 33 | 34 | // Debug entry to show with this log item 35 | private DebugLogEntry logEntry; 36 | 37 | // Index of the entry in the list of entries 38 | private int entryIndex; 39 | public int Index { get { return entryIndex; } } 40 | 41 | private DebugLogRecycledListView manager; 42 | 43 | public void Initialize( DebugLogRecycledListView manager ) 44 | { 45 | this.manager = manager; 46 | } 47 | 48 | public void SetContent( DebugLogEntry logEntry, int entryIndex, bool isExpanded ) 49 | { 50 | this.logEntry = logEntry; 51 | this.entryIndex = entryIndex; 52 | 53 | Vector2 size = transformComponent.sizeDelta; 54 | if( isExpanded ) 55 | { 56 | logText.horizontalOverflow = HorizontalWrapMode.Wrap; 57 | size.y = manager.SelectedItemHeight; 58 | } 59 | else 60 | { 61 | logText.horizontalOverflow = HorizontalWrapMode.Overflow; 62 | size.y = manager.ItemHeight; 63 | } 64 | transformComponent.sizeDelta = size; 65 | 66 | logText.text = isExpanded ? logEntry.ToString() : logEntry.logString; 67 | logTypeImage.sprite = logEntry.logTypeSpriteRepresentation; 68 | } 69 | 70 | // Show the collapsed count of the debug entry 71 | public void ShowCount() 72 | { 73 | logCountText.text = logEntry.count.ToString(); 74 | logCountParent.SetActive( true ); 75 | } 76 | 77 | // Hide the collapsed count of the debug entry 78 | public void HideCount() 79 | { 80 | logCountParent.SetActive( false ); 81 | } 82 | 83 | // This log item is clicked, show the debug entry's stack trace 84 | public void OnPointerClick( PointerEventData eventData ) 85 | { 86 | #if UNITY_EDITOR 87 | if( eventData.button == PointerEventData.InputButton.Right ) 88 | { 89 | Match regex = Regex.Match( logEntry.stackTrace, @"\(at .*\.cs:[0-9]+\)$", RegexOptions.Multiline ); 90 | if( regex.Success ) 91 | { 92 | string line = logEntry.stackTrace.Substring( regex.Index + 4, regex.Length - 5 ); 93 | int lineSeparator = line.IndexOf( ':' ); 94 | MonoScript script = AssetDatabase.LoadAssetAtPath( line.Substring( 0, lineSeparator ) ); 95 | if( script != null ) 96 | AssetDatabase.OpenAsset( script, int.Parse( line.Substring( lineSeparator + 1 ) ) ); 97 | } 98 | } 99 | else 100 | manager.OnLogItemClicked( this ); 101 | #else 102 | manager.OnLogItemClicked( this ); 103 | #endif 104 | } 105 | 106 | public float CalculateExpandedHeight( string content ) 107 | { 108 | string text = logText.text; 109 | HorizontalWrapMode wrapMode = logText.horizontalOverflow; 110 | 111 | logText.text = content; 112 | logText.horizontalOverflow = HorizontalWrapMode.Wrap; 113 | 114 | float result = logText.preferredHeight; 115 | 116 | logText.text = text; 117 | logText.horizontalOverflow = wrapMode; 118 | 119 | return Mathf.Max( manager.ItemHeight, result ); 120 | } 121 | 122 | // Return a string containing complete information about the debug entry 123 | public override string ToString() 124 | { 125 | return logEntry.ToString(); 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogItem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d2ea291be9de70a4abfec595203c96c1 3 | timeCreated: 1465919949 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogLogcatListener.cs: -------------------------------------------------------------------------------- 1 | #if !UNITY_EDITOR && UNITY_ANDROID 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | // Credit: https://stackoverflow.com/a/41018028/2373034 6 | namespace IngameDebugConsole 7 | { 8 | public class DebugLogLogcatListener : AndroidJavaProxy 9 | { 10 | private Queue queuedLogs; 11 | private AndroidJavaObject nativeObject; 12 | 13 | public DebugLogLogcatListener() : base( "com.yasirkula.unity.LogcatLogReceiver" ) 14 | { 15 | queuedLogs = new Queue( 16 ); 16 | } 17 | 18 | ~DebugLogLogcatListener() 19 | { 20 | Stop(); 21 | 22 | if( nativeObject != null ) 23 | nativeObject.Dispose(); 24 | } 25 | 26 | public void Start( string arguments ) 27 | { 28 | if( nativeObject == null ) 29 | nativeObject = new AndroidJavaObject( "com.yasirkula.unity.LogcatLogger" ); 30 | 31 | nativeObject.Call( "Start", this, arguments ); 32 | } 33 | 34 | public void Stop() 35 | { 36 | if( nativeObject != null ) 37 | nativeObject.Call( "Stop" ); 38 | } 39 | 40 | public void OnLogReceived( string log ) 41 | { 42 | queuedLogs.Enqueue( log ); 43 | } 44 | 45 | public string GetLog() 46 | { 47 | if( queuedLogs.Count > 0 ) 48 | return queuedLogs.Dequeue(); 49 | 50 | return null; 51 | } 52 | } 53 | } 54 | #endif -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogLogcatListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dd3b7385882055d4a8c2b91deb6b2470 3 | timeCreated: 1510076185 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a4f16ed905adcd4ab0d7c8c11f0d72c 3 | timeCreated: 1522092746 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: -9869 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogPopup.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using UnityEngine.EventSystems; 4 | using System.Collections; 5 | 6 | // Manager class for the debug popup 7 | namespace IngameDebugConsole 8 | { 9 | public class DebugLogPopup : MonoBehaviour, IPointerClickHandler, IBeginDragHandler, IDragHandler, IEndDragHandler 10 | { 11 | private RectTransform popupTransform; 12 | 13 | // Dimensions of the popup divided by 2 14 | private Vector2 halfSize; 15 | 16 | // Background image that will change color to indicate an alert 17 | private Image backgroundImage; 18 | 19 | // Canvas group to modify visibility of the popup 20 | private CanvasGroup canvasGroup; 21 | 22 | [SerializeField] 23 | private DebugLogManager debugManager; 24 | 25 | [SerializeField] 26 | private Text newInfoCountText; 27 | [SerializeField] 28 | private Text newWarningCountText; 29 | [SerializeField] 30 | private Text newErrorCountText; 31 | 32 | // Number of new debug entries since the log window has been closed 33 | private int newInfoCount = 0, newWarningCount = 0, newErrorCount = 0; 34 | 35 | private Color normalColor; 36 | 37 | [SerializeField] 38 | private Color alertColorInfo; 39 | [SerializeField] 40 | private Color alertColorWarning; 41 | [SerializeField] 42 | private Color alertColorError; 43 | 44 | private bool isPopupBeingDragged = false; 45 | 46 | // Coroutines for simple code-based animations 47 | private IEnumerator moveToPosCoroutine = null; 48 | 49 | void Awake() 50 | { 51 | popupTransform = (RectTransform)transform; 52 | backgroundImage = GetComponent(); 53 | canvasGroup = GetComponent(); 54 | 55 | normalColor = backgroundImage.color; 56 | } 57 | 58 | void Start() 59 | { 60 | halfSize = popupTransform.sizeDelta * 0.5f * popupTransform.root.localScale.x; 61 | } 62 | 63 | public void OnViewportDimensionsChanged() 64 | { 65 | halfSize = popupTransform.sizeDelta * 0.5f * popupTransform.root.localScale.x; 66 | OnEndDrag( null ); 67 | } 68 | 69 | public void NewInfoLogArrived() 70 | { 71 | newInfoCount++; 72 | newInfoCountText.text = newInfoCount.ToString(); 73 | 74 | if( newWarningCount == 0 && newErrorCount == 0 ) 75 | backgroundImage.color = alertColorInfo; 76 | } 77 | 78 | public void NewWarningLogArrived() 79 | { 80 | newWarningCount++; 81 | newWarningCountText.text = newWarningCount.ToString(); 82 | 83 | if( newErrorCount == 0 ) 84 | backgroundImage.color = alertColorWarning; 85 | } 86 | 87 | public void NewErrorLogArrived() 88 | { 89 | newErrorCount++; 90 | newErrorCountText.text = newErrorCount.ToString(); 91 | 92 | backgroundImage.color = alertColorError; 93 | } 94 | 95 | private void Reset() 96 | { 97 | newInfoCount = 0; 98 | newWarningCount = 0; 99 | newErrorCount = 0; 100 | 101 | newInfoCountText.text = "0"; 102 | newWarningCountText.text = "0"; 103 | newErrorCountText.text = "0"; 104 | 105 | backgroundImage.color = normalColor; 106 | } 107 | 108 | // A simple smooth movement animation 109 | private IEnumerator MoveToPosAnimation( Vector3 targetPos ) 110 | { 111 | float modifier = 0f; 112 | Vector3 initialPos = popupTransform.position; 113 | 114 | while( modifier < 1f ) 115 | { 116 | modifier += 4f * Time.unscaledDeltaTime; 117 | popupTransform.position = Vector3.Lerp( initialPos, targetPos, modifier ); 118 | 119 | yield return null; 120 | } 121 | } 122 | 123 | // Popup is clicked 124 | public void OnPointerClick( PointerEventData data ) 125 | { 126 | // Hide the popup and show the log window 127 | if( !isPopupBeingDragged ) 128 | { 129 | debugManager.Show(); 130 | Hide(); 131 | } 132 | } 133 | 134 | // Hides the log window and shows the popup 135 | public void Show() 136 | { 137 | canvasGroup.interactable = true; 138 | canvasGroup.blocksRaycasts = true; 139 | canvasGroup.alpha = 1f; 140 | 141 | // Reset the counters 142 | Reset(); 143 | 144 | // Update position in case resolution changed while hidden 145 | OnViewportDimensionsChanged(); 146 | } 147 | 148 | // Hide the popup 149 | public void Hide() 150 | { 151 | canvasGroup.interactable = false; 152 | canvasGroup.blocksRaycasts = false; 153 | canvasGroup.alpha = 0f; 154 | } 155 | 156 | public void OnBeginDrag( PointerEventData data ) 157 | { 158 | isPopupBeingDragged = true; 159 | 160 | // If a smooth movement animation is in progress, cancel it 161 | if( moveToPosCoroutine != null ) 162 | { 163 | StopCoroutine( moveToPosCoroutine ); 164 | moveToPosCoroutine = null; 165 | } 166 | } 167 | 168 | // Reposition the popup 169 | public void OnDrag( PointerEventData data ) 170 | { 171 | popupTransform.position = data.position; 172 | } 173 | 174 | // Smoothly translate the popup to the nearest edge 175 | public void OnEndDrag( PointerEventData data ) 176 | { 177 | int screenWidth = Screen.width; 178 | int screenHeight = Screen.height; 179 | 180 | Vector3 pos = popupTransform.position; 181 | 182 | // Find distances to all four edges 183 | float distToLeft = pos.x; 184 | float distToRight = Mathf.Abs( pos.x - screenWidth ); 185 | 186 | float distToBottom = Mathf.Abs( pos.y ); 187 | float distToTop = Mathf.Abs( pos.y - screenHeight ); 188 | 189 | float horDistance = Mathf.Min( distToLeft, distToRight ); 190 | float vertDistance = Mathf.Min( distToBottom, distToTop ); 191 | 192 | // Find the nearest edge's coordinates 193 | if( horDistance < vertDistance ) 194 | { 195 | if( distToLeft < distToRight ) 196 | pos = new Vector3( halfSize.x, pos.y, 0f ); 197 | else 198 | pos = new Vector3( screenWidth - halfSize.x, pos.y, 0f ); 199 | 200 | pos.y = Mathf.Clamp( pos.y, halfSize.y, screenHeight - halfSize.y ); 201 | } 202 | else 203 | { 204 | if( distToBottom < distToTop ) 205 | pos = new Vector3( pos.x, halfSize.y, 0f ); 206 | else 207 | pos = new Vector3( pos.x, screenHeight - halfSize.y, 0f ); 208 | 209 | pos.x = Mathf.Clamp( pos.x, halfSize.x, screenWidth - halfSize.x ); 210 | } 211 | 212 | // If another smooth movement animation is in progress, cancel it 213 | if( moveToPosCoroutine != null ) 214 | StopCoroutine( moveToPosCoroutine ); 215 | 216 | // Smoothly translate the popup to the specified position 217 | moveToPosCoroutine = MoveToPosAnimation( pos ); 218 | DebugLogManager.Instance.StartCoroutine( moveToPosCoroutine ); 219 | 220 | isPopupBeingDragged = false; 221 | } 222 | } 223 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogPopup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05cc4b1999716644c9308528e38e7081 3 | timeCreated: 1466533184 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugLogRecycledListView.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce231987d32488f43b6fb798f7df43f6 3 | timeCreated: 1466373025 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugsOnScrollListener.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using UnityEngine.EventSystems; 4 | 5 | // Listens to scroll events on the scroll rect that debug items are stored 6 | // and decides whether snap to bottom should be true or not 7 | // 8 | // Procedure: if, after a user input (drag or scroll), scrollbar is at the bottom, then 9 | // snap to bottom shall be true, otherwise it shall be false 10 | namespace IngameDebugConsole 11 | { 12 | public class DebugsOnScrollListener : MonoBehaviour, IScrollHandler, IBeginDragHandler, IEndDragHandler 13 | { 14 | public ScrollRect debugsScrollRect; 15 | public DebugLogManager debugLogManager; 16 | 17 | public void OnScroll( PointerEventData data ) 18 | { 19 | if( IsScrollbarAtBottom() ) 20 | debugLogManager.SetSnapToBottom( true ); 21 | else 22 | debugLogManager.SetSnapToBottom( false ); 23 | } 24 | 25 | public void OnBeginDrag( PointerEventData data ) 26 | { 27 | debugLogManager.SetSnapToBottom( false ); 28 | } 29 | 30 | public void OnEndDrag( PointerEventData data ) 31 | { 32 | if( IsScrollbarAtBottom() ) 33 | debugLogManager.SetSnapToBottom( true ); 34 | else 35 | debugLogManager.SetSnapToBottom( false ); 36 | } 37 | 38 | public void OnScrollbarDragStart( BaseEventData data ) 39 | { 40 | debugLogManager.SetSnapToBottom( false ); 41 | } 42 | 43 | public void OnScrollbarDragEnd( BaseEventData data ) 44 | { 45 | if( IsScrollbarAtBottom() ) 46 | debugLogManager.SetSnapToBottom( true ); 47 | else 48 | debugLogManager.SetSnapToBottom( false ); 49 | } 50 | 51 | private bool IsScrollbarAtBottom() 52 | { 53 | float scrollbarYPos = debugsScrollRect.verticalNormalizedPosition; 54 | if( scrollbarYPos <= 1E-6f ) 55 | return true; 56 | 57 | return false; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/DebugsOnScrollListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb564dcb180e586429c57456166a76b5 3 | timeCreated: 1466004663 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/GestureAround.cs: -------------------------------------------------------------------------------- 1 | /* 2 | ######### 3 | ############ 4 | ############# 5 | ## ########### 6 | ### ###### ##### 7 | ### ####### #### 8 | ### ########## #### 9 | #### ########### #### 10 | #### ########### ##### 11 | ##### ### ######## ##### 12 | ##### ### ######## ###### 13 | ###### ### ########### ###### 14 | ###### #### ############## ###### 15 | ####### ##################### ###### 16 | ####### ###################### ###### 17 | ####### ###### ################# ###### 18 | ####### ###### ###### ######### ###### 19 | ####### ## ###### ###### ###### 20 | ####### ###### ##### ##### 21 | ###### ##### ##### #### 22 | ##### #### ##### ### 23 | ##### ### ### # 24 | ### ### ### 25 | ## ### ### 26 | __________#_______####_______####______________ 27 | 28 | 我们的未来没有BUG 29 | * ============================================================================== 30 | * Filename: GestureAround 31 | * Created: 2018/7/28 13:12:05 32 | * Author: To Harden The Mind 33 | * Purpose: 34 | * ============================================================================== 35 | */ 36 | 37 | namespace IngameDebugConsole 38 | { 39 | using System; 40 | using System.Collections.Generic; 41 | using UnityEngine; 42 | 43 | public class GestureAround : MonoBehaviour 44 | { 45 | public bool bIsClockWise; 46 | public float fGestureRadius = 50; 47 | public float fGestureRadiusFix = 10; 48 | public float fRotateFactor = 500f;//旋转系数 49 | public DebugLogManager logWin = null; 50 | 51 | private Vector3 _v3AroundCenterPoint; 52 | private bool _bGesturing; 53 | private Vector3 _v3LastStarPoint; 54 | private float _fSampleDisThreshold; 55 | private List _inputGesturePhases = new List(); 56 | 57 | private float _fTotalRotate; 58 | 59 | // Use this for initialization 60 | void Awake() 61 | { 62 | _fSampleDisThreshold = fGestureRadius / 4f;//(2*PI/24),PI~=3 63 | _fTotalRotate = 0; 64 | } 65 | 66 | // Update is called once per frame 67 | void Update() 68 | { 69 | if (Input.GetMouseButtonDown(0)) 70 | { 71 | _bGesturing = true; 72 | _v3LastStarPoint = Input.mousePosition; 73 | } 74 | else if (Input.GetMouseButtonUp(0)) 75 | { 76 | _bGesturing = false; 77 | } 78 | 79 | if (_bGesturing) 80 | { 81 | //支持一个大概的圆形区,空心处理的小一点,就用修正值了 82 | if (Vector3.Distance(_v3AroundCenterPoint, Input.mousePosition) > fGestureRadiusFix) 83 | { 84 | var deltaVec = Input.mousePosition - _v3LastStarPoint; 85 | if (deltaVec.sqrMagnitude > _fSampleDisThreshold * _fSampleDisThreshold)//超过阈值,记录一下 86 | { 87 | _inputGesturePhases.Add(deltaVec); 88 | if (_inputGesturePhases.Count > 1) 89 | { 90 | int curCount = _inputGesturePhases.Count; 91 | float multiDot = Vector3.Dot(_inputGesturePhases[curCount - 1], _inputGesturePhases[curCount - 2]); 92 | Vector3 multiCross = Vector3.Cross(_inputGesturePhases[curCount - 1], _inputGesturePhases[curCount - 2]); 93 | if (multiDot <= 0)//画圆只能是锐角 94 | { 95 | _inputGesturePhases.Clear(); 96 | } 97 | else if (multiCross.z == 0 || (multiCross.z > 0 && !bIsClockWise) || (multiCross.z < 0 && bIsClockWise))//叉积右手法则,顺时针后一条叉前一条,z应该是正,z是0表示平行 98 | { 99 | _inputGesturePhases.Clear(); 100 | } 101 | else 102 | { 103 | //通过上面几个条件测试表示是正在画一个圆,可以转动物体了 104 | float rotateZ = bIsClockWise ? -1 * fRotateFactor * Time.deltaTime : 1 * fRotateFactor * Time.deltaTime; 105 | _fTotalRotate += rotateZ; 106 | _v3LastStarPoint = Input.mousePosition; 107 | 108 | if (Mathf.Abs(_fTotalRotate) > 360) 109 | { 110 | logWin.ToggleDebugWin(); 111 | _fTotalRotate = 0; 112 | } 113 | } 114 | } 115 | } 116 | } 117 | else 118 | { 119 | _inputGesturePhases.Clear();//乱画就清除路径,重新来过 120 | } 121 | } 122 | } 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Scripts/GestureAround.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 201354d53dca4bf48adee187bac26b5f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb5d7b23a9e684a41a6a5d4f300eb1e6 3 | folderAsset: yes 4 | timeCreated: 1465925237 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconClear.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconClear.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconClear.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a9e374666ad6cc47807bb001844f3d8 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 5 28 | maxTextureSize: 32 29 | textureSettings: 30 | filterMode: 1 31 | aniso: 16 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 1 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 32 55 | textureFormat: -1 56 | textureCompression: 0 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 32 63 | textureFormat: -1 64 | textureCompression: 0 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 32 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: WebGL 78 | maxTextureSize: 32 79 | textureFormat: -1 80 | textureCompression: 0 81 | compressionQuality: 50 82 | crunchedCompression: 0 83 | allowsAlphaSplitting: 0 84 | overridden: 0 85 | spriteSheet: 86 | serializedVersion: 2 87 | sprites: [] 88 | outline: [] 89 | spritePackingTag: DebugLogUI 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconCollapse.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconCollapse.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconCollapse.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1546f8db185caf4dafcfa58efa3ba2c 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconError.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconError.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconError.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 66305a19e3614694f868c75a982e6b68 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconHide.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconHide.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconHide.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3905a73a6672d9449647aaf036e23fc 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconInfo.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconInfo.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconInfo.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a97d5afa6254804f81b7ba956296996 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconResize.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconResize.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconResize.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9fd8f6b461461f4a92eafc60921ee78 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconSnapToBottom.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconSnapToBottom.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconSnapToBottom.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 066c0b04be98cd348abb79add91d42bf 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconSnapToBottomBg.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconSnapToBottomBg.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconSnapToBottomBg.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b902f763d0e47364dae25207b7e47800 3 | timeCreated: 1465990202 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 13, y: 13, z: 13, w: 13} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconWarning.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/IconWarning.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/IconWarning.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05c7216c78d4dd34ebe2bac9c1e274d7 3 | timeCreated: 1465928682 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 066d3840badf4d24dba1d42b4c59b888 3 | timeCreated: 1465917228 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 4 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | sRGBTexture: 1 12 | linearTexture: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 6 25 | cubemapConvolution: 0 26 | seamlessCubemap: 0 27 | textureFormat: 5 28 | maxTextureSize: 32 29 | textureSettings: 30 | filterMode: 1 31 | aniso: -1 32 | mipBias: -1 33 | wrapMode: 1 34 | nPOTScale: 0 35 | lightmap: 0 36 | compressionQuality: 50 37 | spriteMode: 1 38 | spriteExtrude: 1 39 | spriteMeshType: 1 40 | alignment: 0 41 | spritePivot: {x: 0.5, y: 0.5} 42 | spriteBorder: {x: 12, y: 12, z: 12, w: 12} 43 | spritePixelsToUnits: 100 44 | alphaUsage: 1 45 | alphaIsTransparency: 1 46 | spriteTessellationDetail: -1 47 | textureType: 8 48 | textureShape: 1 49 | maxTextureSizeSet: 0 50 | compressionQualitySet: 0 51 | textureFormatSet: 0 52 | platformSettings: 53 | - buildTarget: DefaultTexturePlatform 54 | maxTextureSize: 32 55 | textureFormat: -1 56 | textureCompression: 0 57 | compressionQuality: 50 58 | crunchedCompression: 0 59 | allowsAlphaSplitting: 0 60 | overridden: 0 61 | - buildTarget: Standalone 62 | maxTextureSize: 32 63 | textureFormat: -1 64 | textureCompression: 0 65 | compressionQuality: 50 66 | crunchedCompression: 0 67 | allowsAlphaSplitting: 0 68 | overridden: 0 69 | - buildTarget: Android 70 | maxTextureSize: 32 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: WebGL 78 | maxTextureSize: 32 79 | textureFormat: -1 80 | textureCompression: 0 81 | compressionQuality: 50 82 | crunchedCompression: 0 83 | allowsAlphaSplitting: 0 84 | overridden: 0 85 | spriteSheet: 86 | serializedVersion: 2 87 | sprites: [] 88 | outline: [] 89 | spritePackingTag: DebugLogUI 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground2.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground2.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground2.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98e8e1cf8dc7dbf469617c2e40c8a944 3 | timeCreated: 1465924863 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 12, y: 12, z: 12, w: 12} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground3.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground3.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/SlicedBackground3.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3f0d976f6d6802479d6465d11b3aa68 3 | timeCreated: 1465990202 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 1 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 13, y: 13, z: 13, w: 13} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 5 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: DebugLogUI 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/Unused.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6caae32d463529478f2186f47c2e3fe 3 | folderAsset: yes 4 | timeCreated: 1466010601 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconErrorHighRes.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconErrorHighRes.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconErrorHighRes.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a97ca0b99ece2d94aaaf59653feb45dd 3 | timeCreated: 1465923851 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 64 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 8 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconInfoHighRes.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconInfoHighRes.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconInfoHighRes.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33b115bf5efdfa04d8e2e0b70a6643cd 3 | timeCreated: 1465924280 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 64 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 8 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconWarningHighRes.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconWarningHighRes.psd -------------------------------------------------------------------------------- /Assets/ThirdParty/IngameDebugConsole/Sprites/Unused/IconWarningHighRes.psd.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af17f91b4376d6a41a793c056c02dadc 3 | timeCreated: 1465923828 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 64 31 | textureSettings: 32 | filterMode: -1 33 | aniso: 16 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 1 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | textureType: 8 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d03ee7fd71e572344bf9987051e6af7c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38a6ea1f686cc7b4e87d00c306a7a10b 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0004c0a5ad641d4468ebb65779ee48b2 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android/libs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9cd62bafd75e7604daf2b561b80d136d 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android/libs/armeabi-v7a.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8d0cd0f5702f0144af2498bce3ee3e9 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android/libs/armeabi-v7a/libxlua.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/Android/libs/armeabi-v7a/libxlua.so -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android/libs/armeabi-v7a/libxlua.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e1b2e17cce240d4c8ff5457ac996e0d 3 | timeCreated: 1451443249 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 1 13 | settings: 14 | CPU: ARMv7 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | DefaultValueInitialized: true 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android/libs/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 079ea0ed741ff194a80cce029630b5ac 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android/libs/x86/libxlua.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/Android/libs/x86/libxlua.so -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/Android/libs/x86/libxlua.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 038a89637b659e346a7a712ce0c9271b 3 | timeCreated: 1451443249 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 1 13 | settings: 14 | CPU: x86 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | DefaultValueInitialized: true 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8c5688e381fddc4eb22e6f96f69541c 3 | folderAsset: yes 4 | timeCreated: 1489995541 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/ARM.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6375603a0a1e2647b0c426b27646eb7 3 | folderAsset: yes 4 | timeCreated: 1490146877 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/ARM/xlua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/WSA/ARM/xlua.dll -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/ARM/xlua.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb3d94d8757d66b40b20f0386b52d01d 3 | timeCreated: 1490146878 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | Any: 13 | enabled: 0 14 | settings: {} 15 | Editor: 16 | enabled: 0 17 | settings: 18 | DefaultValueInitialized: true 19 | WindowsStoreApps: 20 | enabled: 1 21 | settings: 22 | CPU: ARM 23 | userData: 24 | assetBundleName: 25 | assetBundleVariant: 26 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/x64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4d5a7116d7e9a33409205303635b8635 3 | folderAsset: yes 4 | timeCreated: 1490146877 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/x64/xlua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/WSA/x64/xlua.dll -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/x64/xlua.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a73864467778862409da51f9feb60004 3 | timeCreated: 1490146878 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | Any: 13 | enabled: 0 14 | settings: {} 15 | Editor: 16 | enabled: 0 17 | settings: 18 | DefaultValueInitialized: true 19 | WindowsStoreApps: 20 | enabled: 1 21 | settings: 22 | CPU: x64 23 | userData: 24 | assetBundleName: 25 | assetBundleVariant: 26 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e0f35de38a8ed24fa8b20d444c9ee5e 3 | folderAsset: yes 4 | timeCreated: 1490146877 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/x86/xlua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/WSA/x86/xlua.dll -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WSA/x86/xlua.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3fd23a6414095674493657a67a8043a1 3 | timeCreated: 1489995544 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | Any: 13 | enabled: 0 14 | settings: {} 15 | Editor: 16 | enabled: 0 17 | settings: 18 | DefaultValueInitialized: true 19 | WindowsStoreApps: 20 | enabled: 1 21 | settings: 22 | CPU: x86 23 | userData: 24 | assetBundleName: 25 | assetBundleVariant: 26 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WebGL.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e7f3a5adb034d684cb13cb257c29a1c3 3 | folderAsset: yes 4 | timeCreated: 1504062948 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WebGL/xlua_webgl.cpp: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include "../../../WebGLPlugins/lapi.c" 3 | #include "../../../WebGLPlugins/lauxlib.c" 4 | #include "../../../WebGLPlugins/lbaselib.c" 5 | #include "../../../WebGLPlugins/lbitlib.c" 6 | #include "../../../WebGLPlugins/lcode.c" 7 | #include "../../../WebGLPlugins/lcorolib.c" 8 | #include "../../../WebGLPlugins/lctype.c" 9 | #include "../../../WebGLPlugins/ldblib.c" 10 | #include "../../../WebGLPlugins/ldebug.c" 11 | #include "../../../WebGLPlugins/ldo.c" 12 | #include "../../../WebGLPlugins/ldump.c" 13 | #include "../../../WebGLPlugins/lfunc.c" 14 | #include "../../../WebGLPlugins/lgc.c" 15 | #include "../../../WebGLPlugins/linit.c" 16 | #include "../../../WebGLPlugins/liolib.c" 17 | #include "../../../WebGLPlugins/llex.c" 18 | #include "../../../WebGLPlugins/lmathlib.c" 19 | #include "../../../WebGLPlugins/lmem.c" 20 | #include "../../../WebGLPlugins/loadlib.c" 21 | #include "../../../WebGLPlugins/lobject.c" 22 | #include "../../../WebGLPlugins/lopcodes.c" 23 | #include "../../../WebGLPlugins/loslib.c" 24 | #include "../../../WebGLPlugins/lparser.c" 25 | #include "../../../WebGLPlugins/lstate.c" 26 | #include "../../../WebGLPlugins/lstring.c" 27 | #include "../../../WebGLPlugins/lstrlib.c" 28 | #include "../../../WebGLPlugins/ltable.c" 29 | #include "../../../WebGLPlugins/ltablib.c" 30 | #include "../../../WebGLPlugins/ltm.c" 31 | #include "../../../WebGLPlugins/lundump.c" 32 | #include "../../../WebGLPlugins/lutf8lib.c" 33 | #include "../../../WebGLPlugins/lvm.c" 34 | #include "../../../WebGLPlugins/lzio.c" 35 | #include "../../../WebGLPlugins/i64lib.c" 36 | #include "../../../WebGLPlugins/perflib.c" 37 | #include "../../../WebGLPlugins/xlua.c" 38 | } 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/WebGL/xlua_webgl.cpp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 92f9773841d5ffd44b794b9b584a5c05 3 | timeCreated: 1504062948 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 2 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | data: 13 | first: 14 | Any: 15 | second: 16 | enabled: 0 17 | settings: {} 18 | data: 19 | first: 20 | Editor: Editor 21 | second: 22 | enabled: 0 23 | settings: 24 | DefaultValueInitialized: true 25 | data: 26 | first: 27 | Facebook: WebGL 28 | second: 29 | enabled: 1 30 | settings: {} 31 | data: 32 | first: 33 | WebGL: WebGL 34 | second: 35 | enabled: 1 36 | settings: {} 37 | userData: 38 | assetBundleName: 39 | assetBundleVariant: 40 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/iOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a4ab2e5e00054b03a7bf96d03e5b4e1 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/iOS/HotfixFlags.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int* xlua_hotfix_flags = NULL; 5 | int xlua_hotfix_flags_len = 0; 6 | 7 | extern "C" { 8 | 9 | int xlua_get_hotfix_flag(int idx) { 10 | if (idx >= xlua_hotfix_flags_len) { 11 | return 0; 12 | } else { 13 | return xlua_hotfix_flags[idx]; 14 | } 15 | } 16 | 17 | void xlua_set_hotfix_flag(int idx, int flag) { 18 | int i = 0; 19 | int* new_hotfix_flags = NULL; 20 | if (idx >= xlua_hotfix_flags_len) { 21 | if (xlua_hotfix_flags == NULL) { 22 | xlua_hotfix_flags = (int*)malloc((idx + 1) * sizeof(int)); 23 | } else { 24 | new_hotfix_flags = (int*)realloc(xlua_hotfix_flags, (idx + 1) * sizeof(int)); 25 | if (NULL == new_hotfix_flags) { // just skip operation 26 | return; 27 | } 28 | xlua_hotfix_flags = new_hotfix_flags; 29 | } 30 | for(i = xlua_hotfix_flags_len; i < (idx + 1); i++) { 31 | xlua_hotfix_flags[i] = 0; 32 | } 33 | xlua_hotfix_flags_len = idx + 1; 34 | } 35 | xlua_hotfix_flags[idx] = flag; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/iOS/HotfixFlags.cpp.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef0ed550afe43d449b58d883fad0585c 3 | timeCreated: 1498103331 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | isOverridable: 0 11 | platformData: 12 | Any: 13 | enabled: 0 14 | settings: {} 15 | Editor: 16 | enabled: 0 17 | settings: 18 | DefaultValueInitialized: true 19 | iOS: 20 | enabled: 1 21 | settings: {} 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/iOS/libxlua.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/iOS/libxlua.a -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/iOS/libxlua.a.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2d65468f3356ca741b3fbebea91dfb6c 3 | timeCreated: 1451443249 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | iOS: 19 | enabled: 1 20 | settings: {} 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b0b0c4ffe67d2f4292c5211de91e55f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86/libxlua.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/x86/libxlua.so -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86/libxlua.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f19d785ae44ddc478a08a87ccd9dbb2 3 | timeCreated: 1488352111 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 0 13 | settings: 14 | CPU: AnyCPU 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: x86 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 1 26 | settings: 27 | CPU: x86 28 | Linux64: 29 | enabled: 0 30 | settings: 31 | CPU: None 32 | LinuxUniversal: 33 | enabled: 1 34 | settings: 35 | CPU: x86 36 | OSXIntel: 37 | enabled: 0 38 | settings: 39 | CPU: None 40 | OSXIntel64: 41 | enabled: 0 42 | settings: 43 | CPU: None 44 | OSXUniversal: 45 | enabled: 0 46 | settings: 47 | CPU: None 48 | WP8: 49 | enabled: 0 50 | settings: 51 | CPU: AnyCPU 52 | DontProcess: False 53 | PlaceholderPath: 54 | Win: 55 | enabled: 1 56 | settings: 57 | CPU: AnyCPU 58 | Win64: 59 | enabled: 0 60 | settings: 61 | CPU: None 62 | WindowsStoreApps: 63 | enabled: 0 64 | settings: 65 | CPU: AnyCPU 66 | DontProcess: False 67 | PlaceholderPath: 68 | SDK: AnySDK 69 | iOS: 70 | enabled: 0 71 | settings: 72 | CompileFlags: 73 | FrameworkDependencies: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86/xlua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/x86/xlua.dll -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86/xlua.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79f5c811b2e4e444ab2d97cad5cfd934 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Android: 10 | enabled: 0 11 | settings: 12 | CPU: AnyCPU 13 | Any: 14 | enabled: 0 15 | settings: {} 16 | Editor: 17 | enabled: 1 18 | settings: 19 | CPU: x86 20 | DefaultValueInitialized: true 21 | OS: Windows 22 | Linux: 23 | enabled: 1 24 | settings: 25 | CPU: x86 26 | Linux64: 27 | enabled: 0 28 | settings: 29 | CPU: None 30 | LinuxUniversal: 31 | enabled: 0 32 | settings: 33 | CPU: x86 34 | OSXIntel: 35 | enabled: 1 36 | settings: 37 | CPU: AnyCPU 38 | OSXIntel64: 39 | enabled: 0 40 | settings: 41 | CPU: None 42 | OSXUniversal: 43 | enabled: 0 44 | settings: 45 | CPU: x86 46 | WP8: 47 | enabled: 0 48 | settings: 49 | CPU: AnyCPU 50 | DontProcess: False 51 | PlaceholderPath: 52 | Win: 53 | enabled: 1 54 | settings: 55 | CPU: AnyCPU 56 | Win64: 57 | enabled: 0 58 | settings: 59 | CPU: None 60 | WindowsStoreApps: 61 | enabled: 0 62 | settings: 63 | CPU: AnyCPU 64 | DontProcess: False 65 | PlaceholderPath: 66 | SDK: AnySDK 67 | iOS: 68 | enabled: 0 69 | settings: 70 | CompileFlags: 71 | FrameworkDependencies: 72 | userData: 73 | assetBundleName: 74 | assetBundleVariant: 75 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86_64.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8dba1dfb80e5b7d40bd214fc4ed2ed6b 3 | folderAsset: yes 4 | timeCreated: 1451020766 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86_64/libxlua.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/x86_64/libxlua.so -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86_64/libxlua.so.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1055830ddb882704fa71275ed9b2a78d 3 | timeCreated: 1488352111 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Android: 12 | enabled: 0 13 | settings: 14 | CPU: AnyCPU 15 | Any: 16 | enabled: 0 17 | settings: {} 18 | Editor: 19 | enabled: 0 20 | settings: 21 | CPU: x86_64 22 | DefaultValueInitialized: true 23 | OS: AnyOS 24 | Linux: 25 | enabled: 0 26 | settings: 27 | CPU: None 28 | Linux64: 29 | enabled: 1 30 | settings: 31 | CPU: x86_64 32 | LinuxUniversal: 33 | enabled: 1 34 | settings: 35 | CPU: x86_64 36 | OSXIntel: 37 | enabled: 0 38 | settings: 39 | CPU: None 40 | OSXIntel64: 41 | enabled: 0 42 | settings: 43 | CPU: None 44 | OSXUniversal: 45 | enabled: 0 46 | settings: 47 | CPU: None 48 | WP8: 49 | enabled: 0 50 | settings: 51 | CPU: AnyCPU 52 | DontProcess: False 53 | PlaceholderPath: 54 | Win: 55 | enabled: 0 56 | settings: 57 | CPU: None 58 | Win64: 59 | enabled: 1 60 | settings: 61 | CPU: AnyCPU 62 | WindowsStoreApps: 63 | enabled: 0 64 | settings: 65 | CPU: AnyCPU 66 | DontProcess: False 67 | PlaceholderPath: 68 | SDK: AnySDK 69 | iOS: 70 | enabled: 0 71 | settings: 72 | CompileFlags: 73 | FrameworkDependencies: 74 | userData: 75 | assetBundleName: 76 | assetBundleVariant: 77 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86_64/xlua.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/x86_64/xlua.dll -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/x86_64/xlua.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: abe4c5ca91772ea4fae0ae15603c10e4 3 | PluginImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | isPreloaded: 0 8 | platformData: 9 | Android: 10 | enabled: 0 11 | settings: 12 | CPU: AnyCPU 13 | Any: 14 | enabled: 0 15 | settings: {} 16 | Editor: 17 | enabled: 1 18 | settings: 19 | CPU: x86_64 20 | DefaultValueInitialized: true 21 | OS: Windows 22 | Linux: 23 | enabled: 0 24 | settings: 25 | CPU: None 26 | Linux64: 27 | enabled: 1 28 | settings: 29 | CPU: x86_64 30 | LinuxUniversal: 31 | enabled: 0 32 | settings: 33 | CPU: x86_64 34 | OSXIntel: 35 | enabled: 0 36 | settings: 37 | CPU: None 38 | OSXIntel64: 39 | enabled: 1 40 | settings: 41 | CPU: AnyCPU 42 | OSXUniversal: 43 | enabled: 0 44 | settings: 45 | CPU: x86_64 46 | WP8: 47 | enabled: 0 48 | settings: 49 | CPU: AnyCPU 50 | DontProcess: False 51 | PlaceholderPath: 52 | Win: 53 | enabled: 0 54 | settings: 55 | CPU: None 56 | Win64: 57 | enabled: 1 58 | settings: 59 | CPU: AnyCPU 60 | WindowsStoreApps: 61 | enabled: 0 62 | settings: 63 | CPU: AnyCPU 64 | DontProcess: False 65 | PlaceholderPath: 66 | SDK: AnySDK 67 | iOS: 68 | enabled: 0 69 | settings: 70 | CompileFlags: 71 | FrameworkDependencies: 72 | userData: 73 | assetBundleName: 74 | assetBundleVariant: 75 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/xlua.bundle.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6a34038df77e48438826b6ff94aa69e 3 | folderAsset: yes 4 | PluginImporter: 5 | serializedVersion: 1 6 | iconMap: {} 7 | executionOrder: {} 8 | isPreloaded: 0 9 | platformData: 10 | Android: 11 | enabled: 0 12 | settings: 13 | CPU: AnyCPU 14 | Any: 15 | enabled: 0 16 | settings: {} 17 | Editor: 18 | enabled: 1 19 | settings: 20 | CPU: AnyCPU 21 | DefaultValueInitialized: true 22 | OS: OSX 23 | Linux: 24 | enabled: 0 25 | settings: 26 | CPU: x86 27 | Linux64: 28 | enabled: 0 29 | settings: 30 | CPU: x86_64 31 | OSXIntel: 32 | enabled: 1 33 | settings: 34 | CPU: AnyCPU 35 | OSXIntel64: 36 | enabled: 1 37 | settings: 38 | CPU: AnyCPU 39 | OSXUniversal: 40 | enabled: 1 41 | settings: 42 | CPU: AnyCPU 43 | Win: 44 | enabled: 0 45 | settings: 46 | CPU: AnyCPU 47 | Win64: 48 | enabled: 0 49 | settings: 50 | CPU: AnyCPU 51 | iOS: 52 | enabled: 0 53 | settings: 54 | CompileFlags: 55 | FrameworkDependencies: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/xlua.bundle/Contents.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7e4b7549f5e4a4e71806e3ec8e428b15 3 | folderAsset: yes 4 | timeCreated: 1457422691 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/xlua.bundle/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 15G31 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | xlua 11 | CFBundleIdentifier 12 | com.xlua 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | xlua 17 | CFBundlePackageType 18 | BNDL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleSupportedPlatforms 24 | 25 | MacOSX 26 | 27 | CFBundleVersion 28 | 1 29 | DTCompiler 30 | com.apple.compilers.llvm.clang.1_0 31 | DTPlatformBuild 32 | 7D1014 33 | DTPlatformVersion 34 | GM 35 | DTSDKBuild 36 | 15E60 37 | DTSDKName 38 | macosx10.11 39 | DTXcode 40 | 0731 41 | DTXcodeBuild 42 | 7D1014 43 | NSHumanReadableCopyright 44 | Copyright @2017 THL A29 Limited, a Tencent company. All rights reserved. 45 | 46 | 47 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/xlua.bundle/Contents/Info.plist.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ac30af4fb2add4d41a9f50fe4f8292a3 3 | timeCreated: 1457422749 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/xlua.bundle/Contents/MacOS.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9d8e68fa0fd1465294f1255f6ed8563 3 | folderAsset: yes 4 | timeCreated: 1457422691 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/xlua.bundle/Contents/MacOS/xlua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Plugins/xlua.bundle/Contents/MacOS/xlua -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Plugins/xlua.bundle/Contents/MacOS/xlua.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f3b1cda03ac84924b1ee0595fc019f5 3 | timeCreated: 1457422749 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bb791a499b501e49b16ee83a2a20948 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/CodeEmit.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93ce5fd372271b04199841c920eb0268 3 | timeCreated: 1470883945 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/CopyByValue.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | #if USE_UNI_LUA 10 | using LuaAPI = UniLua.Lua; 11 | using RealStatePtr = UniLua.ILuaState; 12 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 13 | #else 14 | using LuaAPI = XLua.LuaDLL.Lua; 15 | using RealStatePtr = System.IntPtr; 16 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 17 | #endif 18 | 19 | using System; 20 | 21 | namespace XLua 22 | { 23 | public static partial class CopyByValue 24 | { 25 | // for int 8 26 | public static bool Pack(IntPtr buff, int offset, byte field) 27 | { 28 | return LuaAPI.xlua_pack_int8_t(buff, offset, field); 29 | } 30 | public static bool UnPack(IntPtr buff, int offset, out byte field) 31 | { 32 | return LuaAPI.xlua_unpack_int8_t(buff, offset, out field); 33 | } 34 | public static bool Pack(IntPtr buff, int offset, sbyte field) 35 | { 36 | return LuaAPI.xlua_pack_int8_t(buff, offset, (byte)field); 37 | } 38 | public static bool UnPack(IntPtr buff, int offset, out sbyte field) 39 | { 40 | byte tfield; 41 | bool ret = LuaAPI.xlua_unpack_int8_t(buff, offset, out tfield); 42 | field = (sbyte)tfield; 43 | return ret; 44 | } 45 | // for int16 46 | public static bool Pack(IntPtr buff, int offset, short field) 47 | { 48 | return LuaAPI.xlua_pack_int16_t(buff, offset, field); 49 | } 50 | public static bool UnPack(IntPtr buff, int offset, out short field) 51 | { 52 | return LuaAPI.xlua_unpack_int16_t(buff, offset, out field); 53 | } 54 | public static bool Pack(IntPtr buff, int offset, ushort field) 55 | { 56 | return LuaAPI.xlua_pack_int16_t(buff, offset, (short)field); 57 | } 58 | public static bool UnPack(IntPtr buff, int offset, out ushort field) 59 | { 60 | short tfield; 61 | bool ret = LuaAPI.xlua_unpack_int16_t(buff, offset, out tfield); 62 | field = (ushort)tfield; 63 | return ret; 64 | } 65 | // for int32 66 | public static bool Pack(IntPtr buff, int offset, int field) 67 | { 68 | return LuaAPI.xlua_pack_int32_t(buff, offset, field); 69 | } 70 | public static bool UnPack(IntPtr buff, int offset, out int field) 71 | { 72 | return LuaAPI.xlua_unpack_int32_t(buff, offset, out field); 73 | } 74 | public static bool Pack(IntPtr buff, int offset, uint field) 75 | { 76 | return LuaAPI.xlua_pack_int32_t(buff, offset, (int)field); 77 | } 78 | public static bool UnPack(IntPtr buff, int offset, out uint field) 79 | { 80 | int tfield; 81 | bool ret = LuaAPI.xlua_unpack_int32_t(buff, offset, out tfield); 82 | field = (uint)tfield; 83 | return ret; 84 | } 85 | // for int64 86 | public static bool Pack(IntPtr buff, int offset, long field) 87 | { 88 | return LuaAPI.xlua_pack_int64_t(buff, offset, field); 89 | } 90 | public static bool UnPack(IntPtr buff, int offset, out long field) 91 | { 92 | return LuaAPI.xlua_unpack_int64_t(buff, offset, out field); 93 | } 94 | public static bool Pack(IntPtr buff, int offset, ulong field) 95 | { 96 | return LuaAPI.xlua_pack_int64_t(buff, offset, (long)field); 97 | } 98 | public static bool UnPack(IntPtr buff, int offset, out ulong field) 99 | { 100 | long tfield; 101 | bool ret = LuaAPI.xlua_unpack_int64_t(buff, offset, out tfield); 102 | field = (ulong)tfield; 103 | return ret; 104 | } 105 | // for float 106 | public static bool Pack(IntPtr buff, int offset, float field) 107 | { 108 | return LuaAPI.xlua_pack_float(buff, offset, field); 109 | } 110 | public static bool UnPack(IntPtr buff, int offset, out float field) 111 | { 112 | return LuaAPI.xlua_unpack_float(buff, offset, out field); 113 | } 114 | // for double 115 | public static bool Pack(IntPtr buff, int offset, double field) 116 | { 117 | return LuaAPI.xlua_pack_double(buff, offset, field); 118 | } 119 | public static bool UnPack(IntPtr buff, int offset, out double field) 120 | { 121 | return LuaAPI.xlua_unpack_double(buff, offset, out field); 122 | } 123 | // for decimal 124 | public static bool Pack(IntPtr buff, int offset, decimal field) 125 | { 126 | return LuaAPI.xlua_pack_decimal(buff, offset, ref field); 127 | } 128 | public static bool UnPack(IntPtr buff, int offset, out decimal field) 129 | { 130 | byte scale; 131 | byte sign; 132 | int hi32; 133 | ulong lo64; 134 | if (!LuaAPI.xlua_unpack_decimal(buff, offset, out scale, out sign, out hi32, out lo64)) 135 | { 136 | field = default(decimal); 137 | return false; 138 | } 139 | 140 | field = new Decimal((int)(lo64 & 0xFFFFFFFF), (int)(lo64 >> 32), hi32, (sign & 0x80) != 0, scale); 141 | return true; 142 | } 143 | 144 | public static bool IsStruct(Type type) 145 | { 146 | return type.IsValueType() && !type.IsEnum() && !type.IsPrimitive(); 147 | } 148 | 149 | } 150 | } 151 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/CopyByValue.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aba23a1792dbc49438a2357566447979 3 | timeCreated: 1467189953 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/DelegateBridge.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | #if USE_UNI_LUA 10 | using LuaAPI = UniLua.Lua; 11 | using RealStatePtr = UniLua.ILuaState; 12 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 13 | #else 14 | using LuaAPI = XLua.LuaDLL.Lua; 15 | using RealStatePtr = System.IntPtr; 16 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 17 | #endif 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Runtime.InteropServices; 22 | 23 | namespace XLua 24 | { 25 | public abstract class DelegateBridgeBase : LuaBase 26 | { 27 | private Type firstKey = null; 28 | 29 | private Delegate firstValue = null; 30 | 31 | private Dictionary bindTo = null; 32 | 33 | protected int errorFuncRef; 34 | 35 | public DelegateBridgeBase(int reference, LuaEnv luaenv) : base(reference, luaenv) 36 | { 37 | errorFuncRef = luaenv.errorFuncRef; 38 | } 39 | 40 | public bool TryGetDelegate(Type key, out Delegate value) 41 | { 42 | if(key == firstKey) 43 | { 44 | value = firstValue; 45 | return true; 46 | } 47 | if (bindTo != null) 48 | { 49 | return bindTo.TryGetValue(key, out value); 50 | } 51 | value = null; 52 | return false; 53 | } 54 | 55 | public void AddDelegate(Type key, Delegate value) 56 | { 57 | if (key == firstKey) 58 | { 59 | throw new ArgumentException("An element with the same key already exists in the dictionary."); 60 | } 61 | 62 | if (firstKey == null && bindTo == null) // nothing 63 | { 64 | firstKey = key; 65 | firstValue = value; 66 | } 67 | else if (firstKey != null && bindTo == null) // one key existed 68 | { 69 | bindTo = new Dictionary(); 70 | bindTo.Add(firstKey, firstValue); 71 | firstKey = null; 72 | firstValue = null; 73 | bindTo.Add(key, value); 74 | } 75 | else 76 | { 77 | bindTo.Add(key, value); 78 | } 79 | } 80 | 81 | public virtual Delegate GetDelegateByType(Type type) 82 | { 83 | return null; 84 | } 85 | } 86 | 87 | public static class HotfixDelegateBridge 88 | { 89 | #if UNITY_IPHONE && !UNITY_EDITOR 90 | [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] 91 | public static extern bool xlua_get_hotfix_flag(int idx); 92 | 93 | 94 | [DllImport("__Internal", CallingConvention = CallingConvention.Cdecl)] 95 | public static extern void xlua_set_hotfix_flag(int idx, bool flag); 96 | #else 97 | public static bool xlua_get_hotfix_flag(int idx) 98 | { 99 | return (idx < DelegateBridge.DelegateBridgeList.Length) && (DelegateBridge.DelegateBridgeList[idx] != null); 100 | } 101 | #endif 102 | 103 | public static DelegateBridge Get(int idx) 104 | { 105 | return DelegateBridge.DelegateBridgeList[idx]; 106 | } 107 | 108 | public static void Set(int idx, DelegateBridge val) 109 | { 110 | if (idx >= DelegateBridge.DelegateBridgeList.Length) 111 | { 112 | DelegateBridge[] newList = new DelegateBridge[idx + 1]; 113 | for (int i = 0; i < DelegateBridge.DelegateBridgeList.Length; i++) 114 | { 115 | newList[i] = DelegateBridge.DelegateBridgeList[i]; 116 | } 117 | DelegateBridge.DelegateBridgeList = newList; 118 | } 119 | DelegateBridge.DelegateBridgeList[idx] = val; 120 | #if UNITY_IPHONE && !UNITY_EDITOR 121 | xlua_set_hotfix_flag(idx, val != null); 122 | #endif 123 | } 124 | } 125 | 126 | public partial class DelegateBridge : DelegateBridgeBase 127 | { 128 | internal static DelegateBridge[] DelegateBridgeList = new DelegateBridge[0]; 129 | 130 | public static bool Gen_Flag = false; 131 | 132 | public DelegateBridge(int reference, LuaEnv luaenv) : base(reference, luaenv) 133 | { 134 | } 135 | 136 | 137 | #if HOTFIX_ENABLE 138 | 139 | private int _oldTop = 0; 140 | private Stack _stack = new Stack(); 141 | 142 | public void InvokeSessionStart() 143 | { 144 | System.Threading.Monitor.Enter(luaEnv.luaEnvLock); 145 | var L = luaEnv.L; 146 | _stack.Push(_oldTop); 147 | _oldTop = LuaAPI.lua_gettop(L); 148 | LuaAPI.load_error_func(L, luaEnv.errorFuncRef); 149 | LuaAPI.lua_getref(L, luaReference); 150 | } 151 | 152 | public void Invoke(int nRet) 153 | { 154 | int error = LuaAPI.lua_pcall(luaEnv.L, LuaAPI.lua_gettop(luaEnv.L) - _oldTop - 2, nRet, _oldTop + 1); 155 | if (error != 0) 156 | { 157 | var lastOldTop = _oldTop; 158 | InvokeSessionEnd(); 159 | luaEnv.ThrowExceptionFromError(lastOldTop); 160 | } 161 | } 162 | 163 | public void InvokeSessionEnd() 164 | { 165 | LuaAPI.lua_settop(luaEnv.L, _oldTop); 166 | _oldTop = _stack.Pop(); 167 | System.Threading.Monitor.Exit(luaEnv.luaEnvLock); 168 | } 169 | 170 | public TResult InvokeSessionEndWithResult() 171 | { 172 | if (LuaAPI.lua_gettop(luaEnv.L) < _oldTop + 2) 173 | { 174 | InvokeSessionEnd(); 175 | throw new InvalidOperationException("no result!"); 176 | } 177 | 178 | try 179 | { 180 | TResult ret; 181 | luaEnv.translator.Get(luaEnv.L, _oldTop + 2, out ret); 182 | return ret; 183 | } 184 | finally 185 | { 186 | InvokeSessionEnd(); 187 | } 188 | } 189 | 190 | public void InParam(T p) 191 | { 192 | try 193 | { 194 | luaEnv.translator.PushByType(luaEnv.L, p); 195 | } 196 | catch (Exception e) 197 | { 198 | InvokeSessionEnd(); 199 | throw e; 200 | } 201 | } 202 | 203 | public void InParams(T[] ps) 204 | { 205 | try 206 | { 207 | for (int i = 0; i < ps.Length; i++) 208 | { 209 | luaEnv.translator.PushByType(luaEnv.L, ps[i]); 210 | } 211 | } 212 | catch (Exception e) 213 | { 214 | InvokeSessionEnd(); 215 | throw e; 216 | } 217 | } 218 | 219 | //pos start from 0 220 | public void OutParam(int pos, out TResult ret) 221 | { 222 | if (LuaAPI.lua_gettop(luaEnv.L) < _oldTop + 2 + pos) 223 | { 224 | InvokeSessionEnd(); 225 | throw new InvalidOperationException("no result in " + pos); 226 | } 227 | 228 | try 229 | { 230 | luaEnv.translator.Get(luaEnv.L, _oldTop + 2 + pos, out ret); 231 | } 232 | catch (Exception e) 233 | { 234 | InvokeSessionEnd(); 235 | throw e; 236 | } 237 | } 238 | #endif 239 | } 240 | } 241 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/DelegateBridge.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b8c4165852e3e92468656dc6efb30a28 3 | timeCreated: 1452574309 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e53aa922da0a00469e5760902833e71 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Generator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e866a5f1000c29940843aece98d0c706 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Hotfix.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9f175d9e85601f4da903e391b8b7c77 3 | timeCreated: 1482299911 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/LinkXmlGen.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f94464b9267f9b4cbf2f98681e22880 3 | folderAsset: yes 4 | timeCreated: 1479105499 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/LinkXmlGen/LinkXmlGen.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections.Generic; 3 | using XLua; 4 | using System.IO; 5 | using System.Text; 6 | using System.Linq; 7 | using CSObjectWrapEditor; 8 | 9 | public class LinkXmlGen : ScriptableObject 10 | { 11 | public TextAsset Template; 12 | 13 | public static IEnumerable GetTasks(LuaEnv lua_env, UserConfig user_cfg) 14 | { 15 | LuaTable data = lua_env.NewTable(); 16 | var assembly_infos = (from type in (user_cfg.ReflectionUse.Concat(user_cfg.LuaCallCSharp)) 17 | group type by type.Assembly.GetName().Name into assembly_info 18 | select new { FullName = assembly_info.Key, Types = assembly_info.ToList()}).ToList(); 19 | data.Set("assembly_infos", assembly_infos); 20 | 21 | yield return new CustomGenTask 22 | { 23 | Data = data, 24 | Output = new StreamWriter(GeneratorConfig.common_path + "/link.xml", 25 | false, Encoding.UTF8) 26 | }; 27 | } 28 | 29 | [GenCodeMenu]//加到Generate Code菜单里头 30 | public static void GenLinkXml() 31 | { 32 | Generator.CustomGen(ScriptableObject.CreateInstance().Template.text, GetTasks); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/LinkXmlGen/LinkXmlGen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5fa8c6bd6daed854c98654418f48a830 3 | timeCreated: 1482482561 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: 8 | - Template: {fileID: 4900000, guid: 384feb229d259f549bbbac9e910b782b, type: 3} 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/LinkXmlGen/LinkXmlGen.tpl.txt: -------------------------------------------------------------------------------- 1 | <% 2 | require "TemplateCommon" 3 | %> 4 | 5 | 6 | <%ForEachCsList(assembly_infos, function(assembly_info)%> 7 | 8 | <%ForEachCsList(assembly_info.Types, function(type) 9 | %> 10 | <%end)%> 11 | 12 | <%end)%> 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/LinkXmlGen/LinkXmlGen.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 384feb229d259f549bbbac9e910b782b 3 | timeCreated: 1481621844 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c7307955fb71fc4090eb2a906a78a0a 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaClassWrap.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8503038eabbabe44dac0f5f749d4411a 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaClassWrapGCM.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2bd79d95fd859724283926ad8fa4df30 3 | timeCreated: 1501232428 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaDelegateBridge.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using System; 12 | <% 13 | require "TemplateCommon" 14 | %> 15 | 16 | namespace XLua 17 | { 18 | public partial class DelegateBridge : DelegateBridgeBase 19 | { 20 | <% 21 | ForEachCsList(delegates_groups, function(delegates_group, group_idx) 22 | local delegate = delegates_group.Key 23 | local parameters = delegate:GetParameters() 24 | local in_num = CalcCsList(parameters, function(p) return not (p.IsOut and p.ParameterType.IsByRef) end) 25 | local out_num = CalcCsList(parameters, function(p) return p.IsOut or p.ParameterType.IsByRef end) 26 | local in_pos = 0 27 | local has_return = (delegate.ReturnType.FullName ~= "System.Void") 28 | local return_type_name = has_return and CsFullTypeName(delegate.ReturnType) or "void" 29 | local out_idx = has_return and 2 or 1 30 | if has_return then out_num = out_num + 1 end 31 | %> 32 | public <%=return_type_name%> __Gen_Delegate_Imp<%=group_idx%>(<%ForEachCsList(parameters, function(parameter, pi) 33 | if pi ~= 0 then 34 | %>, <% 35 | end 36 | if parameter.IsOut then 37 | %>out <% 38 | elseif parameter.ParameterType.IsByRef then 39 | %>ref <% 40 | end 41 | %><%=CsFullTypeName(parameter.ParameterType)%> p<%=pi%><% 42 | end) %>) 43 | { 44 | #if THREAD_SAFE || HOTFIX_ENABLE 45 | lock (luaEnv.luaEnvLock) 46 | { 47 | #endif 48 | RealStatePtr L = luaEnv.rawL; 49 | int err_func =LuaAPI.load_error_func(L, errorFuncRef); 50 | <%if CallNeedTranslator(delegate, "") then %>ObjectTranslator translator = luaEnv.translator;<%end%> 51 | 52 | LuaAPI.lua_getref(L, luaReference); 53 | 54 | <% 55 | local param_count = parameters.Length 56 | local has_v_params = param_count > 0 and parameters[param_count - 1].IsParamArray 57 | ForEachCsList(parameters, function(parameter, pi) 58 | if not (parameter.IsOut and parameter.ParameterType.IsByRef) then 59 | %><%=GetPushStatement(parameter.ParameterType, 'p' .. pi, has_v_params and pi == param_count - 1)%>; 60 | <% 61 | end 62 | end) %> 63 | int __gen_error = LuaAPI.lua_pcall(L, <%=has_v_params and ((in_num - 1) .. " + (p".. (param_count - 1) .. " == null ? 0 : p" .. (param_count - 1) .. ".Length)" ) or in_num%>, <%=out_num%>, err_func); 64 | if (__gen_error != 0) 65 | luaEnv.ThrowExceptionFromError(err_func - 1); 66 | 67 | <%ForEachCsList(parameters, function(parameter, pi) 68 | if parameter.IsOut or parameter.ParameterType.IsByRef then 69 | %><%=GetCasterStatement(parameter.ParameterType, "err_func" .. (" + "..out_idx), 'p' .. pi)%>; 70 | <% 71 | out_idx = out_idx + 1 72 | end 73 | end) %> 74 | <%if has_return then %><%=GetCasterStatement(delegate.ReturnType, "err_func + 1", "__gen_ret", true)%>;<% end%> 75 | LuaAPI.lua_settop(L, err_func - 1); 76 | <%if has_return then %>return __gen_ret;<% end%> 77 | #if THREAD_SAFE || HOTFIX_ENABLE 78 | } 79 | #endif 80 | } 81 | <%end)%> 82 | 83 | static DelegateBridge() 84 | { 85 | Gen_Flag = true; 86 | } 87 | 88 | public override Delegate GetDelegateByType(Type type) 89 | { 90 | <% 91 | ForEachCsList(delegates_groups, function(delegates_group, group_idx) 92 | ForEachCsList(delegates_group.Value, function(delegate) 93 | if delegate.DeclaringType then 94 | local delegate_type_name = CsFullTypeName(delegate.DeclaringType) 95 | %> 96 | if (type == typeof(<%=delegate_type_name%>)) 97 | { 98 | return new <%=delegate_type_name%>(__Gen_Delegate_Imp<%=group_idx%>); 99 | } 100 | <% 101 | end 102 | end) 103 | end) 104 | %> 105 | return null; 106 | } 107 | } 108 | 109 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaDelegateBridge.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3d992756e2469044484be75f78e4e556 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaDelegateWrap.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using XLua; 12 | using System.Collections.Generic; 13 | <% 14 | require "TemplateCommon" 15 | 16 | local parameters = delegate:GetParameters() 17 | local in_num = CalcCsList(parameters, function(p) return not (p.IsOut and p.ParameterType.IsByRef) end) 18 | local out_num = CalcCsList(parameters, function(p) return p.IsOut or p.ParameterType.IsByRef end) 19 | local in_pos = 0 20 | local has_return = (delegate.ReturnType.Name ~= "Void") 21 | %> 22 | 23 | namespace XLua.CSObjectWrap 24 | { 25 | using Utils = XLua.Utils; 26 | public class <%=CSVariableName(type)%>Wrap 27 | { 28 | public static void __Register(RealStatePtr L) 29 | { 30 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 31 | Utils.BeginObjectRegister(typeof(<%=CsFullTypeName(type)%>), L, translator, 0, 0, 0, 0); 32 | Utils.EndObjectRegister(typeof(<%=CsFullTypeName(type)%>), L, translator, null, null, null, null, null); 33 | 34 | Utils.BeginClassRegister(typeof(<%=CsFullTypeName(type)%>), L, null, 1, 0, 0); 35 | Utils.EndClassRegister(typeof(<%=CsFullTypeName(type)%>), L, translator); 36 | } 37 | 38 | static Dictionary __MetaFucntions_Dic = new Dictionary(){ 39 | {"__call", __CallMeta}, 40 | {"__add", __AddMeta}, 41 | {"__sub", __SubMeta}, 42 | }; 43 | 44 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 45 | static int __CallMeta(RealStatePtr L) 46 | { 47 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 48 | try { 49 | if(LuaAPI.lua_gettop(L) == <%=in_num+1%> && <%=GetCheckStatement(type, 1)%><% 50 | ForEachCsList(parameters, function(parameter) 51 | if not (parameter.IsOut and parameter.ParameterType.IsByRef) then in_pos = in_pos + 1; 52 | %>&& <%=GetCheckStatement(parameter.ParameterType, in_pos+1)%><% 53 | end 54 | end)%>) 55 | { 56 | <% 57 | in_pos = 0; 58 | ForEachCsList(parameters, function(parameter) 59 | %><% 60 | if not (parameter.IsOut and parameter.ParameterType.IsByRef) then 61 | in_pos = in_pos + 1 62 | %><%=GetCasterStatement(parameter.ParameterType, in_pos+1, parameter.Name, true)%><% 63 | else%><%=CsFullTypeName(parameter.ParameterType)%> <%=parameter.Name%><%end%>; 64 | <%end)%> 65 | <%=GetSelfStatement(type)%>; 66 | 67 | <% 68 | if has_return then 69 | %> <%=CsFullTypeName(delegate.ReturnType)%> __cl_gen_ret = <% 70 | end 71 | %> __cl_gen_to_be_invoked( <%ForEachCsList(parameters, function(parameter, pi) if pi ~= 0 then %>, <% end; if parameter.IsOut then %>out <% elseif parameter.ParameterType.IsByRef then %>ref <% end %><%=parameter.Name%><% end) %> ); 72 | <% 73 | if has_return then 74 | %> <%=GetPushStatement(delegate.ReturnType, "__cl_gen_ret")%>; 75 | <% 76 | end 77 | local in_pos = 0 78 | ForEachCsList(parameters, function(parameter) 79 | if not (parameter.IsOut and parameter.ParameterType.IsByRef) then 80 | in_pos = in_pos + 1 81 | end 82 | if parameter.IsOut or parameter.ParameterType.IsByRef then 83 | %><%=GetPushStatement(parameter.ParameterType:GetElementType(), parameter.Name)%>; 84 | <%if not parameter.IsOut and parameter.ParameterType.IsByRef and NeedUpdate(parameter.ParameterType) then 85 | %><%=GetUpdateStatement(parameter.ParameterType:GetElementType(), in_pos+param_offset, parameter.Name)%>; 86 | <%end%> 87 | <% 88 | end 89 | end) 90 | %> 91 | 92 | return <%=out_num+(has_return and 1 or 0)%>; 93 | } 94 | } catch(System.Exception __gen_e) { 95 | return LuaAPI.luaL_error(L, "c# exception:" + __gen_e); 96 | } 97 | return LuaAPI.luaL_error(L, "invalid arguments to Delegate <%=CsFullTypeName(type)%>!"); 98 | } 99 | 100 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 101 | static int __AddMeta(RealStatePtr L) 102 | { 103 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 104 | try { 105 | <%=GetCasterStatement(type, 1, "leftside", true)%>; 106 | <%=GetCasterStatement(type, 2, "rightside", true)%>; 107 | <%=GetPushStatement(type, "leftside + rightside")%>; 108 | return 1; 109 | } catch(System.Exception __gen_e) { 110 | return LuaAPI.luaL_error(L, "c# exception:" + __gen_e); 111 | } 112 | } 113 | 114 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 115 | static int __SubMeta(RealStatePtr L) 116 | { 117 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 118 | try { 119 | <%=GetCasterStatement(type, 1, "leftside", true)%>; 120 | <%=GetCasterStatement(type, 2, "rightside", true)%>; 121 | <%=GetPushStatement(type, "leftside - rightside")%>; 122 | return 1; 123 | } catch(System.Exception __gen_e) { 124 | return LuaAPI.luaL_error(L, "c# exception:" + __gen_e); 125 | } 126 | } 127 | } 128 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaDelegateWrap.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33b33e1cd617f794b8c801a32f3b2539 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaEnumWrap.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using XLua; 12 | using System.Collections.Generic; 13 | <% 14 | require "TemplateCommon" 15 | local enum_or_op = debug.getmetatable(CS.System.Reflection.BindingFlags.Public).__bor 16 | %> 17 | 18 | namespace XLua.CSObjectWrap 19 | { 20 | using Utils = XLua.Utils; 21 | <%ForEachCsList(types, function(type) 22 | local fields = type:GetFields(enum_or_op(CS.System.Reflection.BindingFlags.Public, CS.System.Reflection.BindingFlags.Static)) 23 | %> 24 | public class <%=CSVariableName(type)%>Wrap 25 | { 26 | public static void __Register(RealStatePtr L) 27 | { 28 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 29 | Utils.BeginObjectRegister(typeof(<%=CsFullTypeName(type)%>), L, translator, 0, 0, 0, 0); 30 | Utils.EndObjectRegister(typeof(<%=CsFullTypeName(type)%>), L, translator, null, null, null, null, null); 31 | 32 | Utils.BeginClassRegister(typeof(<%=CsFullTypeName(type)%>), L, null, <%=fields.Length + 1%>, 0, 0); 33 | <% ForEachCsList(fields, function(field) 34 | if field.Name == "value__" or IsObsolute(field) then return end 35 | %> 36 | Utils.RegisterObject(L, translator, Utils.CLS_IDX, "<%=field.Name%>", <%=CsFullTypeName(type)%>.<%=UnK(field.Name)%>); 37 | <%end)%> 38 | Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom); 39 | 40 | Utils.EndClassRegister(typeof(<%=CsFullTypeName(type)%>), L, translator); 41 | } 42 | 43 | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] 44 | static int __CastFrom(RealStatePtr L) 45 | { 46 | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); 47 | LuaTypes lua_type = LuaAPI.lua_type(L, 1); 48 | if (lua_type == LuaTypes.LUA_TNUMBER) 49 | { 50 | translator.Push<%=CSVariableName(type)%>(L, (<%=CsFullTypeName(type)%>)LuaAPI.xlua_tointeger(L, 1)); 51 | } 52 | <%if fields.Length > 0 then%> 53 | else if(lua_type == LuaTypes.LUA_TSTRING) 54 | { 55 | <% 56 | local is_first = true 57 | ForEachCsList(fields, function(field, i) 58 | if field.Name == "value__" or IsObsolute(field) then return end 59 | %><%=(is_first and "" or "else ")%>if (LuaAPI.xlua_is_eq_str(L, 1, "<%=field.Name%>")) 60 | { 61 | translator.Push<%=CSVariableName(type)%>(L, <%=CsFullTypeName(type)%>.<%=UnK(field.Name)%>); 62 | } 63 | <% 64 | is_first = false 65 | end) 66 | %>else 67 | { 68 | return LuaAPI.luaL_error(L, "invalid string for <%=CsFullTypeName(type)%>!"); 69 | } 70 | } 71 | <%end%> 72 | else 73 | { 74 | return LuaAPI.luaL_error(L, "invalid lua type for <%=CsFullTypeName(type)%>! Expect number or string, got + " + lua_type); 75 | } 76 | 77 | return 1; 78 | } 79 | } 80 | <%end)%> 81 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaEnumWrap.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ae16c73aad9a21a44aef65decb7e4928 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaEnumWrapGCM.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using XLua; 12 | using System.Collections.Generic; 13 | <% 14 | require "TemplateCommon" 15 | %> 16 | 17 | namespace XLua 18 | { 19 | public partial class ObjectTranslator 20 | { 21 | <%ForEachCsList(types, function(type) 22 | local fields = g_enum_get_fields_flag and type:GetFields(g_enum_get_fields_flag) or type:GetFields() 23 | local v_type_name = CSVariableName(type) 24 | %> 25 | public void __Register<%=v_type_name%>(RealStatePtr L) 26 | { 27 | Utils.BeginObjectRegister(typeof(<%=CsFullTypeName(type)%>), L, this, 0, 0, 0, 0); 28 | Utils.EndObjectRegister(typeof(<%=CsFullTypeName(type)%>), L, this, null, null, null, null, null); 29 | 30 | Utils.BeginClassRegister(typeof(<%=CsFullTypeName(type)%>), L, null, <%=fields.Length + 1%>, 0, 0); 31 | <% ForEachCsList(fields, function(field) 32 | if field.Name == "value__" or IsObsolute(field) then return end 33 | %> 34 | Utils.RegisterObject(L, this, Utils.CLS_IDX, "<%=field.Name%>", <%=CsFullTypeName(type)%>.<%=UnK(field.Name)%>); 35 | <%end)%> 36 | Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom<%=v_type_name%>); 37 | 38 | Utils.EndClassRegister(typeof(<%=CsFullTypeName(type)%>), L, this); 39 | } 40 | 41 | int __CastFrom<%=v_type_name%>(RealStatePtr L, int __gen_top) 42 | { 43 | LuaTypes lua_type = LuaAPI.lua_type(L, 1); 44 | if (lua_type == LuaTypes.LUA_TNUMBER) 45 | { 46 | Push<%=v_type_name%>(L, (<%=CsFullTypeName(type)%>)LuaAPI.xlua_tointeger(L, 1)); 47 | } 48 | <%if fields.Length > 0 then%> 49 | else if(lua_type == LuaTypes.LUA_TSTRING) 50 | { 51 | <% 52 | local is_first = true 53 | ForEachCsList(fields, function(field, i) 54 | if field.Name == "value__" or IsObsolute(field) then return end 55 | %><%=(is_first and "" or "else ")%>if (LuaAPI.xlua_is_eq_str(L, 1, "<%=field.Name%>")) 56 | { 57 | Push<%=v_type_name%>(L, <%=CsFullTypeName(type)%>.<%=UnK(field.Name)%>); 58 | } 59 | <% 60 | is_first = false 61 | end) 62 | %>else 63 | { 64 | return LuaAPI.luaL_error(L, "invalid string for <%=CsFullTypeName(type)%>!"); 65 | } 66 | } 67 | <%end%> 68 | else 69 | { 70 | return LuaAPI.luaL_error(L, "invalid lua type for <%=CsFullTypeName(type)%>! Expect number or string, got + " + lua_type); 71 | } 72 | 73 | return 1; 74 | } 75 | <%end)%> 76 | } 77 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaEnumWrapGCM.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea84a5ee7abf8e347a810eb7848add46 3 | timeCreated: 1501232428 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaInterfaceBridge.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7165d08e91378494dadeb10e5338accb 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaRegister.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using System; 12 | using System.Collections.Generic; 13 | using System.Reflection; 14 | <% 15 | require "TemplateCommon" 16 | %> 17 | 18 | namespace XLua.CSObjectWrap 19 | { 20 | public class XLua_Gen_Initer_Register__ 21 | { 22 | static XLua_Gen_Initer_Register__() 23 | { 24 | XLua.LuaEnv.AddIniter((luaenv, translator) => { 25 | <%ForEachCsList(wraps, function(wrap)%> 26 | translator.DelayWrapLoader(typeof(<%=CsFullTypeName(wrap)%>), <%=CSVariableName(wrap)%>Wrap.__Register); 27 | <%end)%> 28 | <% if generic_wraps then 29 | for generic_def, instances in pairs(generic_wraps) do 30 | for _, args in ipairs(instances) do 31 | local generic_arg_list = "<" 32 | ForEachCsList(args, function(generic_arg, gai) 33 | if gai ~= 0 then generic_arg_list = generic_arg_list .. ", " end 34 | generic_arg_list = generic_arg_list .. CsFullTypeName(generic_arg) 35 | end) 36 | generic_arg_list = generic_arg_list .. ">" 37 | 38 | %> 39 | translator.DelayWrapLoader(typeof(<%=generic_def.Name:gsub("`%d+", "") .. generic_arg_list%>), <%=CSVariableName(generic_def)%>Wrap<%=generic_arg_list%>.__Register); 40 | <% 41 | end 42 | end 43 | end%> 44 | <%ForEachCsList(itf_bridges, function(itf_bridge)%> 45 | translator.AddInterfaceBridgeCreator(typeof(<%=CsFullTypeName(itf_bridge)%>), <%=CSVariableName(itf_bridge)%>Bridge.__Create); 46 | <%end)%> 47 | }); 48 | } 49 | 50 | 51 | } 52 | 53 | } 54 | namespace XLua 55 | { 56 | public partial class ObjectTranslator 57 | { 58 | static XLua.CSObjectWrap.XLua_Gen_Initer_Register__ s_gen_reg_dumb_obj = new XLua.CSObjectWrap.XLua_Gen_Initer_Register__(); 59 | static XLua.CSObjectWrap.XLua_Gen_Initer_Register__ gen_reg_dumb_obj {get{return s_gen_reg_dumb_obj;}} 60 | } 61 | 62 | internal partial class InternalGlobals 63 | { 64 | <% 65 | local type_to_methods = {} 66 | local seq_tbl = {} 67 | ForEachCsList(extension_methods, function(extension_method, idx) 68 | local parameters = extension_method:GetParameters() 69 | local type = parameters[0].ParameterType 70 | if not type_to_methods[type] then 71 | type_to_methods[type] = {type = type} 72 | table.insert(seq_tbl, type_to_methods[type]) 73 | end 74 | table.insert(type_to_methods[type], {method = extension_method, index = idx}) 75 | %> 76 | delegate <%=CsFullTypeName(extension_method.ReturnType)%> __GEN_DELEGATE<%=idx%>(<%ForEachCsList(parameters, function(parameter, pi) 77 | %><%if pi ~= 0 then%>, <%end%><%if parameter.IsOut then %>out <% elseif parameter.ParameterType.IsByRef then %>ref <% end %> <%=CsFullTypeName(parameter.ParameterType)%> <%=parameter.Name%><% 78 | end)%>); 79 | <%end)%> 80 | static InternalGlobals() 81 | { 82 | extensionMethodMap = new Dictionary>() 83 | { 84 | <%for _, methods_info in ipairs(seq_tbl) do%> 85 | {typeof(<%=CsFullTypeName(methods_info.type)%>), new List(){ 86 | <% for _, method_info in ipairs(methods_info) do%> 87 | new __GEN_DELEGATE<%=method_info.index%>(<%=CsFullTypeName(method_info.method.DeclaringType)%>.<%=method_info.method.Name%>) 88 | #if UNITY_WSA && !UNITY_EDITOR 89 | .GetMethodInfo(), 90 | #else 91 | .Method, 92 | #endif 93 | <% end%> 94 | }}, 95 | <%end%> 96 | }; 97 | 98 | genTryArrayGetPtr = StaticLuaCallbacks.__tryArrayGet; 99 | genTryArraySetPtr = StaticLuaCallbacks.__tryArraySet; 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaRegister.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e416b82ec9fe340458f97cf1e3468ef7 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaRegisterGCM.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using System; 12 | using System.Collections.Generic; 13 | using System.Reflection; 14 | <% 15 | require "TemplateCommon" 16 | %> 17 | 18 | namespace XLua.CSObjectWrap 19 | { 20 | public class XLua_Gen_Initer_Register__ 21 | { 22 | static XLua_Gen_Initer_Register__() 23 | { 24 | XLua.LuaEnv.AddIniter((luaenv, translator) => { 25 | <%ForEachCsList(wraps, function(wrap)%> 26 | translator.DelayWrapLoader(typeof(<%=CsFullTypeName(wrap)%>), translator.__Register<%=CSVariableName(wrap)%>); 27 | <%end)%> 28 | <% if generic_wraps then 29 | for generic_def, instances in pairs(generic_wraps) do 30 | for _, args in ipairs(instances) do 31 | local generic_arg_list = "<" 32 | ForEachCsList(args, function(generic_arg, gai) 33 | if gai ~= 0 then generic_arg_list = generic_arg_list .. ", " end 34 | generic_arg_list = generic_arg_list .. CsFullTypeName(generic_arg) 35 | end) 36 | generic_arg_list = generic_arg_list .. ">" 37 | 38 | %> 39 | translator.DelayWrapLoader(typeof(<%=generic_def.Name:gsub("`%d+", "") .. generic_arg_list%>), translator.__Register<%=CSVariableName(generic_def)%><%=generic_arg_list%>); 40 | <% 41 | end 42 | end 43 | end%> 44 | <%ForEachCsList(itf_bridges, function(itf_bridge)%> 45 | translator.AddInterfaceBridgeCreator(typeof(<%=CsFullTypeName(itf_bridge)%>), <%=CSVariableName(itf_bridge)%>Bridge.__Create); 46 | <%end)%> 47 | }); 48 | } 49 | 50 | 51 | } 52 | 53 | } 54 | namespace XLua 55 | { 56 | public partial class ObjectTranslator 57 | { 58 | static XLua.CSObjectWrap.XLua_Gen_Initer_Register__ s_gen_reg_dumb_obj = new XLua.CSObjectWrap.XLua_Gen_Initer_Register__(); 59 | static XLua.CSObjectWrap.XLua_Gen_Initer_Register__ gen_reg_dumb_obj {get{return s_gen_reg_dumb_obj;}} 60 | } 61 | 62 | internal partial class InternalGlobals 63 | { 64 | <% 65 | local type_to_methods = {} 66 | local seq_tbl = {} 67 | ForEachCsList(extension_methods, function(extension_method, idx) 68 | local parameters = extension_method:GetParameters() 69 | local type = parameters[0].ParameterType 70 | if not type_to_methods[type] then 71 | type_to_methods[type] = {type = type} 72 | table.insert(seq_tbl, type_to_methods[type]) 73 | end 74 | table.insert(type_to_methods[type], {method = extension_method, index = idx}) 75 | %> 76 | delegate <%=CsFullTypeName(extension_method.ReturnType)%> __GEN_DELEGATE<%=idx%>(<%ForEachCsList(parameters, function(parameter, pi) 77 | %><%if pi ~= 0 then%>, <%end%><%if parameter.IsOut then %>out <% elseif parameter.ParameterType.IsByRef then %>ref <% end %> <%=CsFullTypeName(parameter.ParameterType)%> <%=parameter.Name%><% 78 | end)%>); 79 | <%end)%> 80 | static InternalGlobals() 81 | { 82 | extensionMethodMap = new Dictionary>() 83 | { 84 | <%for _, methods_info in ipairs(seq_tbl) do%> 85 | {typeof(<%=CsFullTypeName(methods_info.type)%>), new List(){ 86 | <% for _, method_info in ipairs(methods_info) do%> 87 | new __GEN_DELEGATE<%=method_info.index%>(<%=CsFullTypeName(method_info.method.DeclaringType)%>.<%=method_info.method.Name%>) 88 | #if UNITY_WSA && !UNITY_EDITOR 89 | .GetMethodInfo(), 90 | #else 91 | .Method, 92 | #endif 93 | <% end%> 94 | }}, 95 | <%end%> 96 | }; 97 | 98 | genTryArrayGetPtr = StaticLuaCallbacks.__tryArrayGet; 99 | genTryArraySetPtr = StaticLuaCallbacks.__tryArraySet; 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaRegisterGCM.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46c7366d55afbf1459674448d92c44c8 3 | timeCreated: 1501232428 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaWrapPusher.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using System; 12 | <% 13 | require "TemplateCommon" 14 | %> 15 | 16 | namespace XLua 17 | { 18 | public partial class ObjectTranslator 19 | { 20 | <%if purevaluetypes.Count > 0 then 21 | local init_class_name = "IniterAdder" .. CSVariableName(purevaluetypes[0].Type) 22 | %> 23 | class <%=init_class_name%> 24 | { 25 | static <%=init_class_name%>() 26 | { 27 | LuaEnv.AddIniter(Init); 28 | } 29 | 30 | static void Init(LuaEnv luaenv, ObjectTranslator translator) 31 | { 32 | <%ForEachCsList(purevaluetypes, function(type_info) 33 | if not type_info.Type.IsValueType then return end 34 | local full_type_name = CsFullTypeName(type_info.Type)%> 35 | translator.RegisterPushAndGetAndUpdate<<%=full_type_name%>>(translator.Push<%=CSVariableName(type_info.Type)%>, translator.Get, translator.Update<%=CSVariableName(type_info.Type)%>);<% 36 | end)%> 37 | <%ForEachCsList(tableoptimzetypes, function(type_info) 38 | local full_type_name = CsFullTypeName(type_info.Type)%> 39 | translator.RegisterCaster<<%=full_type_name%>>(translator.Get);<% 40 | end)%> 41 | } 42 | } 43 | 44 | static <%=init_class_name%> s_<%=init_class_name%>_dumb_obj = new <%=init_class_name%>(); 45 | static <%=init_class_name%> <%=init_class_name%>_dumb_obj {get{return s_<%=init_class_name%>_dumb_obj;}} 46 | <%end%> 47 | 48 | <%ForEachCsList(purevaluetypes, function(type_info) 49 | local type_id_var_name = CSVariableName(type_info.Type) .. '_TypeID' 50 | local enum_ref_var_name = CSVariableName(type_info.Type)..'_EnumRef' 51 | local full_type_name = CsFullTypeName(type_info.Type) 52 | local is_enum = type_info.Type.IsEnum 53 | %>int <%=type_id_var_name%> = -1;<%if is_enum then%> 54 | int <%=enum_ref_var_name%> = -1; 55 | <%end%> 56 | public void Push<%=CSVariableName(type_info.Type)%>(RealStatePtr L, <%=full_type_name%> val) 57 | { 58 | if (<%=type_id_var_name%> == -1) 59 | { 60 | bool is_first; 61 | <%=type_id_var_name%> = getTypeId(L, typeof(<%=full_type_name%>), out is_first); 62 | <%if is_enum then%> 63 | if (<%=enum_ref_var_name%> == -1) 64 | { 65 | Utils.LoadCSTable(L, typeof(<%=full_type_name%>)); 66 | <%=enum_ref_var_name%> = LuaAPI.luaL_ref(L, LuaIndexes.LUA_REGISTRYINDEX); 67 | } 68 | <%end%> 69 | } 70 | <%if is_enum then%> 71 | if (LuaAPI.xlua_tryget_cachedud(L, (int)val, <%=enum_ref_var_name%>) == 1) 72 | { 73 | return; 74 | } 75 | <% 76 | end 77 | if type_info.Flag == CS.XLua.OptimizeFlag.PackAsTable then 78 | %> 79 | var translator = this; 80 | LuaAPI.xlua_pushcstable(L, <%=type_info.FieldInfos.Count%>, <%=type_id_var_name%>); 81 | <%ForEachCsList(type_info.FieldInfos, function(fieldInfo)%> 82 | LuaAPI.xlua_pushasciistring(L, "<%=fieldInfo.Name%>"); 83 | <%=GetPushStatement(fieldInfo.Type, "val."..fieldInfo.Name)%>; 84 | LuaAPI.lua_rawset(L, -3); 85 | <%end)%> 86 | <%else%> 87 | IntPtr buff = LuaAPI.xlua_pushstruct(L, <%=is_enum and 4 or type_info.Size%>, <%=type_id_var_name%>); 88 | if (!CopyByValue.Pack(buff, 0, <%=is_enum and "(int)" or ""%>val)) 89 | { 90 | throw new Exception("pack fail fail for <%=full_type_name%> ,value="+val); 91 | } 92 | <% 93 | end 94 | if is_enum then 95 | %> 96 | LuaAPI.lua_getref(L, <%=enum_ref_var_name%>); 97 | LuaAPI.lua_pushvalue(L, -2); 98 | LuaAPI.xlua_rawseti(L, -2, (int)val); 99 | LuaAPI.lua_pop(L, 1); 100 | <%end%> 101 | } 102 | 103 | public void Get(RealStatePtr L, int index, out <%=full_type_name%> val) 104 | { 105 | LuaTypes type = LuaAPI.lua_type(L, index); 106 | if (type == LuaTypes.LUA_TUSERDATA ) 107 | { 108 | if (LuaAPI.xlua_gettypeid(L, index) != <%=type_id_var_name%>) 109 | { 110 | throw new Exception("invalid userdata for <%=full_type_name%>"); 111 | } 112 | 113 | IntPtr buff = LuaAPI.lua_touserdata(L, index);<%if is_enum then%> 114 | int e; 115 | <%end%>if (!CopyByValue.UnPack(buff, 0, out <%=is_enum and "e" or "val"%>)) 116 | { 117 | throw new Exception("unpack fail for <%=full_type_name%>"); 118 | }<%if is_enum then%> 119 | val = (<%=full_type_name%>)e; 120 | <%end%> 121 | }<%if not is_enum then%> 122 | else if (type ==LuaTypes.LUA_TTABLE) 123 | { 124 | CopyByValue.UnPack(this, L, index, out val); 125 | }<%end%> 126 | else 127 | { 128 | val = (<%=full_type_name%>)objectCasters.GetCaster(typeof(<%=full_type_name%>))(L, index, null); 129 | } 130 | } 131 | 132 | public void Update<%=CSVariableName(type_info.Type)%>(RealStatePtr L, int index, <%=full_type_name%> val) 133 | { 134 | <%if type_info.Flag == CS.XLua.OptimizeFlag.PackAsTable then%> 135 | if (LuaAPI.lua_type(L, index) == LuaTypes.LUA_TTABLE) 136 | { 137 | return; 138 | } 139 | <%else%> 140 | if (LuaAPI.lua_type(L, index) == LuaTypes.LUA_TUSERDATA) 141 | { 142 | if (LuaAPI.xlua_gettypeid(L, index) != <%=type_id_var_name%>) 143 | { 144 | throw new Exception("invalid userdata for <%=full_type_name%>"); 145 | } 146 | 147 | IntPtr buff = LuaAPI.lua_touserdata(L, index); 148 | if (!CopyByValue.Pack(buff, 0, <%=is_enum and "(int)" or ""%>val)) 149 | { 150 | throw new Exception("pack fail for <%=full_type_name%> ,value="+val); 151 | } 152 | } 153 | <%end%> 154 | else 155 | { 156 | throw new Exception("try to update a data with lua type:" + LuaAPI.lua_type(L, index)); 157 | } 158 | } 159 | 160 | <%end)%> 161 | // table cast optimze 162 | <%ForEachCsList(tableoptimzetypes, function(type_info) 163 | local full_type_name = CsFullTypeName(type_info.Type) 164 | %> 165 | public void Get(RealStatePtr L, int index, out <%=full_type_name%> val) 166 | { 167 | LuaTypes type = LuaAPI.lua_type(L, index); 168 | if (type == LuaTypes.LUA_TUSERDATA ) 169 | { 170 | val = (<%=full_type_name%>)FastGetCSObj(L, index); 171 | } 172 | else if (type == LuaTypes.LUA_TTABLE) 173 | { 174 | val = new <%=full_type_name%>(); 175 | int top = LuaAPI.lua_gettop(L); 176 | <%ForEachCsList(type_info.Fields, function(fieldInfo)%> 177 | if (Utils.LoadField(L, index, "<%=fieldInfo.Name%>")) 178 | { 179 | Get(L, top + 1, out val.<%=fieldInfo.Name%>); 180 | } 181 | LuaAPI.lua_pop(L, 1); 182 | <%end)%> 183 | }<%if not type_info.Type.IsValueType then%> 184 | else if (type == LuaTypes.LUA_TNIL || type == LuaTypes.LUA_TNONE) 185 | { 186 | val = null; 187 | }<%end%> 188 | else 189 | { 190 | throw new Exception("can not cast " + LuaAPI.lua_type(L, index) + " to " + typeof(<%=full_type_name%>)); 191 | } 192 | } 193 | <%end)%> 194 | 195 | } 196 | 197 | public partial class StaticLuaCallbacks 198 | { 199 | internal static bool __tryArrayGet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int index) 200 | { 201 | <%ForEachCsList(purevaluetypes, function(type_info, idx) 202 | if not type_info.Type.IsValueType then return end 203 | local full_type_name = CsFullTypeName(type_info.Type) 204 | %> 205 | <%=(idx == 0 and '' or 'else ')%>if (type == typeof(<%=full_type_name%>[])) 206 | { 207 | <%=full_type_name%>[] array = obj as <%=full_type_name%>[]; 208 | translator.Push<%=CSVariableName(type_info.Type)%>(L, array[index]); 209 | return true; 210 | }<% 211 | end)%> 212 | return false; 213 | } 214 | 215 | internal static bool __tryArraySet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int array_idx, int obj_idx) 216 | { 217 | <% 218 | local is_first = true 219 | ForEachCsList(purevaluetypes, tableoptimzetypes, function(type_info) 220 | local full_type_name = CsFullTypeName(type_info.Type) 221 | %> 222 | <%=(is_first and '' or 'else ')%>if (type == typeof(<%=full_type_name%>[])) 223 | { 224 | <%=full_type_name%>[] array = obj as <%=full_type_name%>[]; 225 | translator.Get(L, obj_idx, out array[array_idx]); 226 | return true; 227 | }<% 228 | is_first = false 229 | end)%> 230 | return false; 231 | } 232 | } 233 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/LuaWrapPusher.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d1a916469d261d447972d287b6c5b7a0 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/PackUnpack.tpl.txt: -------------------------------------------------------------------------------- 1 | #if USE_UNI_LUA 2 | using LuaAPI = UniLua.Lua; 3 | using RealStatePtr = UniLua.ILuaState; 4 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 5 | #else 6 | using LuaAPI = XLua.LuaDLL.Lua; 7 | using RealStatePtr = System.IntPtr; 8 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 9 | #endif 10 | 11 | using System; 12 | <% 13 | require "TemplateCommon" 14 | %> 15 | 16 | namespace XLua 17 | { 18 | public static partial class CopyByValue 19 | { 20 | <%ForEachCsList(type_infos, function(type_info) 21 | local full_type_name = CsFullTypeName(type_info.Type) 22 | %> 23 | <%if type_info.IsRoot then 24 | ForEachCsList(type_info.FieldInfos, function(fieldInfo) fieldInfo.Name = UnK(fieldInfo.Name) end) 25 | %> 26 | public static void UnPack(ObjectTranslator translator, RealStatePtr L, int idx, out <%=full_type_name%> val) 27 | { 28 | val = new <%=full_type_name%>(); 29 | int top = LuaAPI.lua_gettop(L); 30 | <%ForEachCsList(type_info.FieldInfos, function(fieldInfo)%> 31 | if (Utils.LoadField(L, idx, "<%=fieldInfo.Name%>")) 32 | { 33 | <%if fieldInfo.IsField then%> 34 | translator.Get(L, top + 1, out val.<%=fieldInfo.Name%>); 35 | <%else%> 36 | var <%=fieldInfo.Name%> = val.<%=fieldInfo.Name%>; 37 | translator.Get(L, top + 1, out <%=fieldInfo.Name%>); 38 | val.<%=fieldInfo.Name%> = <%=fieldInfo.Name%>; 39 | <%end%> 40 | } 41 | LuaAPI.lua_pop(L, 1); 42 | <%end)%> 43 | } 44 | <%end%> 45 | public static bool Pack(IntPtr buff, int offset, <%=full_type_name%> field) 46 | { 47 | <% 48 | local offset_inner = 0 49 | if not type_info.FieldGroup then 50 | ForEachCsList(type_info.FieldInfos, function(fieldInfo) 51 | %> 52 | if(!Pack(buff, offset<%=(offset_inner == 0 and "" or (" + " .. offset_inner))%>, field.<%=fieldInfo.Name%>)) 53 | { 54 | return false; 55 | } 56 | <% 57 | offset_inner = offset_inner + fieldInfo.Size 58 | end) 59 | else 60 | ForEachCsList(type_info.FieldGroup, function(group) 61 | %> 62 | if(!LuaAPI.xlua_pack_float<%=(group.Count == 1 and "" or group.Count)%>(buff, offset<%=(offset_inner == 0 and "" or (" + " .. offset_inner))%><% 63 | ForEachCsList(group, function(fieldInfo, i) 64 | %>, field.<%=fieldInfo.Name%><% 65 | end) 66 | %>)) 67 | { 68 | return false; 69 | } 70 | <% 71 | offset_inner = offset_inner + group.Count * 4 72 | end) 73 | end%> 74 | return true; 75 | } 76 | public static bool UnPack(IntPtr buff, int offset, out <%=full_type_name%> field) 77 | { 78 | field = default(<%=full_type_name%>); 79 | <% 80 | local offset_inner = 0 81 | if not type_info.FieldGroup then 82 | ForEachCsList(type_info.FieldInfos, function(fieldInfo) 83 | if fieldInfo.IsField then 84 | %> 85 | if(!UnPack(buff, offset<%=(offset_inner == 0 and "" or (" + " .. offset_inner))%>, out field.<%=fieldInfo.Name%>)) 86 | { 87 | return false; 88 | } 89 | <%else%> 90 | var <%=fieldInfo.Name%> = field.<%=fieldInfo.Name%>; 91 | if(!UnPack(buff, offset<%=(offset_inner == 0 and "" or (" + " .. offset_inner))%>, out <%=fieldInfo.Name%>)) 92 | { 93 | return false; 94 | } 95 | field.<%=fieldInfo.Name%> = <%=fieldInfo.Name%>; 96 | <% 97 | end 98 | offset_inner = offset_inner + fieldInfo.Size 99 | end) 100 | else 101 | ForEachCsList(type_info.FieldGroup, function(group) 102 | %> 103 | <%ForEachCsList(group, function(fieldInfo)%>float <%=fieldInfo.Name%> = default(float); 104 | <%end)%> 105 | if(!LuaAPI.xlua_unpack_float<%=(group.Count == 1 and "" or group.Count)%>(buff, offset<%=(offset_inner == 0 and "" or (" + " .. offset_inner))%><% 106 | ForEachCsList(group, function(fieldInfo) 107 | %>, out <%=fieldInfo.Name%><% 108 | end) 109 | %>)) 110 | { 111 | return false; 112 | } 113 | <%ForEachCsList(group, function(fieldInfo)%>field.<%=fieldInfo.Name%> = <%=fieldInfo.Name%>; 114 | <%end)%> 115 | <% 116 | offset_inner = offset_inner + group.Count * 4 117 | end) 118 | end%> 119 | return true; 120 | } 121 | <%end)%> 122 | } 123 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/PackUnpack.tpl.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c9ef7e8f2a3b37744aad49b99370c16b 3 | timeCreated: 1481620508 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/Template/TemplateCommon.lua.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb41d53afe75a9443b182e284298feeb 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/TemplateRef.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | namespace XLua 4 | { 5 | public class TemplateRef : ScriptableObject 6 | { 7 | public TextAsset LuaClassWrap; 8 | public TextAsset LuaClassWrapGCM; 9 | public TextAsset LuaDelegateBridge; 10 | public TextAsset LuaDelegateWrap; 11 | public TextAsset LuaEnumWrap; 12 | public TextAsset LuaEnumWrapGCM; 13 | public TextAsset LuaInterfaceBridge; 14 | public TextAsset LuaRegister; 15 | public TextAsset LuaRegisterGCM; 16 | public TextAsset LuaWrapPusher; 17 | public TextAsset PackUnpack; 18 | public TextAsset TemplateCommon; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Editor/TemplateRef.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4898604144dd928468ddca1af81d58ae 3 | timeCreated: 1501232546 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: 8 | - LuaClassWrap: {fileID: 4900000, guid: 8503038eabbabe44dac0f5f749d4411a, type: 3} 9 | - LuaClassWrapGCM: {fileID: 4900000, guid: 2bd79d95fd859724283926ad8fa4df30, type: 3} 10 | - LuaDelegateBridge: {fileID: 4900000, guid: 3d992756e2469044484be75f78e4e556, type: 3} 11 | - LuaDelegateWrap: {fileID: 4900000, guid: 33b33e1cd617f794b8c801a32f3b2539, type: 3} 12 | - LuaEnumWrap: {fileID: 4900000, guid: ae16c73aad9a21a44aef65decb7e4928, type: 3} 13 | - LuaEnumWrapGCM: {fileID: 4900000, guid: ea84a5ee7abf8e347a810eb7848add46, type: 3} 14 | - LuaInterfaceBridge: {fileID: 4900000, guid: 7165d08e91378494dadeb10e5338accb, 15 | type: 3} 16 | - LuaRegister: {fileID: 4900000, guid: e416b82ec9fe340458f97cf1e3468ef7, type: 3} 17 | - LuaRegisterGCM: {fileID: 4900000, guid: 46c7366d55afbf1459674448d92c44c8, type: 3} 18 | - LuaWrapPusher: {fileID: 4900000, guid: d1a916469d261d447972d287b6c5b7a0, type: 3} 19 | - PackUnpack: {fileID: 4900000, guid: c9ef7e8f2a3b37744aad49b99370c16b, type: 3} 20 | - TemplateCommon: {fileID: 4900000, guid: cb41d53afe75a9443b182e284298feeb, type: 3} 21 | executionOrder: 0 22 | icon: {instanceID: 0} 23 | userData: 24 | assetBundleName: 25 | assetBundleVariant: 26 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/GenAttributes.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | using System; 10 | using System.Collections.Generic; 11 | 12 | namespace XLua 13 | { 14 | public enum GenFlag 15 | { 16 | No = 0, 17 | [Obsolete("use GCOptimizeAttribute instead")] 18 | GCOptimize = 1 19 | } 20 | 21 | //如果你要生成Lua调用CSharp的代码,加这个标签 22 | public class LuaCallCSharpAttribute : Attribute 23 | { 24 | GenFlag flag; 25 | public GenFlag Flag { 26 | get 27 | { 28 | return flag; 29 | } 30 | } 31 | 32 | public LuaCallCSharpAttribute(GenFlag flag = GenFlag.No) 33 | { 34 | this.flag = flag; 35 | } 36 | } 37 | 38 | //生成CSharp调用Lua,加这标签 39 | //[AttributeUsage(AttributeTargets.Delegate | AttributeTargets.Interface)] 40 | public class CSharpCallLuaAttribute : Attribute 41 | { 42 | } 43 | 44 | //如果某属性、方法不需要生成,加这个标签 45 | public class BlackListAttribute : Attribute 46 | { 47 | 48 | } 49 | 50 | [Flags] 51 | public enum OptimizeFlag 52 | { 53 | Default = 0, 54 | PackAsTable = 1 55 | } 56 | 57 | //如果想对struct生成免GC代码,加这个标签 58 | public class GCOptimizeAttribute : Attribute 59 | { 60 | OptimizeFlag flag; 61 | public OptimizeFlag Flag 62 | { 63 | get 64 | { 65 | return flag; 66 | } 67 | } 68 | 69 | public GCOptimizeAttribute(OptimizeFlag flag = OptimizeFlag.Default) 70 | { 71 | this.flag = flag; 72 | } 73 | } 74 | 75 | //如果想在反射下使用,加这个标签 76 | public class ReflectionUseAttribute : Attribute 77 | { 78 | 79 | } 80 | 81 | //只能标注Dictionary>的field或者property 82 | public class DoNotGenAttribute : Attribute 83 | { 84 | 85 | } 86 | 87 | public class AdditionalPropertiesAttribute : Attribute 88 | { 89 | 90 | } 91 | 92 | [Flags] 93 | public enum HotfixFlag 94 | { 95 | Stateless = 0, 96 | [Obsolete("use xlua.util.state instead!", true)] 97 | Stateful = 1, 98 | ValueTypeBoxing = 2, 99 | IgnoreProperty = 4, 100 | IgnoreNotPublic = 8, 101 | Inline = 16, 102 | IntKey = 32, 103 | AdaptByDelegate = 64, 104 | } 105 | 106 | public class HotfixAttribute : Attribute 107 | { 108 | HotfixFlag flag; 109 | public HotfixFlag Flag 110 | { 111 | get 112 | { 113 | return flag; 114 | } 115 | } 116 | 117 | public HotfixAttribute(HotfixFlag e = HotfixFlag.Stateless) 118 | { 119 | flag = e; 120 | } 121 | } 122 | 123 | [AttributeUsage(AttributeTargets.Delegate)] 124 | internal class HotfixDelegateAttribute : Attribute 125 | { 126 | } 127 | 128 | #if !XLUA_GENERAL 129 | public static class SysGenConfig 130 | { 131 | [GCOptimize] 132 | static List GCOptimize 133 | { 134 | get 135 | { 136 | return new List() { 137 | typeof(UnityEngine.Vector2), 138 | typeof(UnityEngine.Vector3), 139 | typeof(UnityEngine.Vector4), 140 | typeof(UnityEngine.Color), 141 | typeof(UnityEngine.Quaternion), 142 | typeof(UnityEngine.Ray), 143 | typeof(UnityEngine.Bounds), 144 | typeof(UnityEngine.Ray2D), 145 | }; 146 | } 147 | } 148 | 149 | [AdditionalProperties] 150 | static Dictionary> AdditionalProperties 151 | { 152 | get 153 | { 154 | return new Dictionary>() 155 | { 156 | { typeof(UnityEngine.Ray), new List() { "origin", "direction" } }, 157 | { typeof(UnityEngine.Ray2D), new List() { "origin", "direction" } }, 158 | { typeof(UnityEngine.Bounds), new List() { "center", "extents" } }, 159 | }; 160 | } 161 | } 162 | } 163 | #endif 164 | } 165 | 166 | 167 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/GenAttributes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4455254bac5b6644893ae8183b9eb87c 3 | timeCreated: 1452509750 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/InternalGlobals.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | #if USE_UNI_LUA 10 | using LuaAPI = UniLua.Lua; 11 | using RealStatePtr = UniLua.ILuaState; 12 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 13 | #else 14 | using LuaAPI = XLua.LuaDLL.Lua; 15 | using RealStatePtr = System.IntPtr; 16 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 17 | #endif 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | using System.Reflection; 22 | 23 | namespace XLua 24 | { 25 | internal partial class InternalGlobals 26 | { 27 | internal static byte[] strBuff = new byte[256]; 28 | 29 | internal delegate bool TryArrayGet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int index); 30 | internal delegate bool TryArraySet(Type type, RealStatePtr L, ObjectTranslator translator, object obj, int array_idx, int obj_idx); 31 | internal static TryArrayGet genTryArrayGetPtr = null; 32 | internal static TryArraySet genTryArraySetPtr = null; 33 | 34 | internal static volatile ObjectTranslatorPool objectTranslatorPool = new ObjectTranslatorPool(); 35 | 36 | internal static int LUA_REGISTRYINDEX = -10000; 37 | 38 | internal static Dictionary supportOp = new Dictionary() 39 | { 40 | { "op_Addition", "__add" }, 41 | { "op_Subtraction", "__sub" }, 42 | { "op_Multiply", "__mul" }, 43 | { "op_Division", "__div" }, 44 | { "op_Equality", "__eq" }, 45 | { "op_UnaryNegation", "__unm" }, 46 | { "op_LessThan", "__lt" }, 47 | { "op_LessThanOrEqual", "__le" }, 48 | { "op_Modulus", "__mod" }, 49 | { "op_BitwiseAnd", "__band" }, 50 | { "op_BitwiseOr", "__bor" }, 51 | { "op_ExclusiveOr", "__bxor" }, 52 | { "op_OnesComplement", "__bnot" }, 53 | { "op_LeftShift", "__shl" }, 54 | { "op_RightShift", "__shr" }, 55 | }; 56 | 57 | internal static Dictionary> extensionMethodMap = null; 58 | 59 | #if GEN_CODE_MINIMIZE 60 | internal static LuaDLL.CSharpWrapperCaller CSharpWrapperCallerPtr = new LuaDLL.CSharpWrapperCaller(StaticLuaCallbacks.CSharpWrapperCallerImpl); 61 | #endif 62 | 63 | internal static LuaCSFunction LazyReflectionWrap = new LuaCSFunction(Utils.LazyReflectionCall); 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/InternalGlobals.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bacb817c6d0b48644892c8dc3cb6cfc1 3 | timeCreated: 1496994941 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaBase.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | #if USE_UNI_LUA 10 | using LuaAPI = UniLua.Lua; 11 | using RealStatePtr = UniLua.ILuaState; 12 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 13 | #else 14 | using LuaAPI = XLua.LuaDLL.Lua; 15 | using RealStatePtr = System.IntPtr; 16 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 17 | #endif 18 | 19 | using System; 20 | 21 | namespace XLua 22 | { 23 | public abstract class LuaBase : IDisposable 24 | { 25 | protected bool disposed; 26 | protected int luaReference; 27 | protected LuaEnv luaEnv; 28 | 29 | #if UNITY_EDITOR || XLUA_GENERAL 30 | protected int _errorFuncRef { get { return luaEnv.errorFuncRef; } } 31 | protected RealStatePtr _L { get { return luaEnv.L; } } 32 | protected ObjectTranslator _translator { get { return luaEnv.translator; } } 33 | #endif 34 | 35 | public LuaBase(int reference, LuaEnv luaenv) 36 | { 37 | luaReference = reference; 38 | luaEnv = luaenv; 39 | } 40 | 41 | ~LuaBase() 42 | { 43 | Dispose(false); 44 | } 45 | 46 | public void Dispose() 47 | { 48 | Dispose(true); 49 | GC.SuppressFinalize(this); 50 | } 51 | 52 | public virtual void Dispose(bool disposeManagedResources) 53 | { 54 | if (!disposed) 55 | { 56 | if (luaReference != 0) 57 | { 58 | #if THREAD_SAFE || HOTFIX_ENABLE 59 | lock (luaEnv.luaEnvLock) 60 | { 61 | #endif 62 | bool is_delegate = this is DelegateBridgeBase; 63 | if (disposeManagedResources) 64 | { 65 | luaEnv.translator.ReleaseLuaBase(luaEnv.L, luaReference, is_delegate); 66 | } 67 | else //will dispse by LuaEnv.GC 68 | { 69 | luaEnv.equeueGCAction(new LuaEnv.GCAction { Reference = luaReference, IsDelegate = is_delegate }); 70 | } 71 | #if THREAD_SAFE || HOTFIX_ENABLE 72 | } 73 | #endif 74 | } 75 | luaEnv = null; 76 | disposed = true; 77 | } 78 | } 79 | 80 | public override bool Equals(object o) 81 | { 82 | if (o != null && this.GetType() == o.GetType()) 83 | { 84 | #if THREAD_SAFE || HOTFIX_ENABLE 85 | lock (luaEnv.luaEnvLock) 86 | { 87 | #endif 88 | LuaBase rhs = (LuaBase)o; 89 | var L = luaEnv.L; 90 | if (L != rhs.luaEnv.L) 91 | return false; 92 | int top = LuaAPI.lua_gettop(L); 93 | LuaAPI.lua_getref(L, rhs.luaReference); 94 | LuaAPI.lua_getref(L, luaReference); 95 | int equal = LuaAPI.lua_rawequal(L, -1, -2); 96 | LuaAPI.lua_settop(L, top); 97 | return (equal != 0); 98 | #if THREAD_SAFE || HOTFIX_ENABLE 99 | } 100 | #endif 101 | } 102 | else return false; 103 | } 104 | 105 | public override int GetHashCode() 106 | { 107 | LuaAPI.lua_getref(luaEnv.L, luaReference); 108 | var pointer = LuaAPI.lua_topointer(luaEnv.L, -1); 109 | LuaAPI.lua_pop(luaEnv.L, 1); 110 | return pointer.ToInt32(); 111 | } 112 | 113 | internal virtual void push(RealStatePtr L) 114 | { 115 | LuaAPI.lua_getref(L, luaReference); 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaBase.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36f6e0ab03586ce4493d45dbc2a0ff5c 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaDLL.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Src/LuaDLL.cs -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaDLL.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d60cef534e986e849a829838fbeb74b5 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaEnv.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/Assets/ThirdParty/XLua/Src/LuaEnv.cs -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaEnv.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a72df23459239b4d901cdacabd469d1 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaException.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | using System; 10 | 11 | namespace XLua 12 | { 13 | [Serializable] 14 | public class LuaException : Exception 15 | { 16 | public LuaException(string message) : base(message) 17 | {} 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaException.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b209468b680ef7d4195de21a39bfcae0 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaFunction.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | #if USE_UNI_LUA 10 | using LuaAPI = UniLua.Lua; 11 | using RealStatePtr = UniLua.ILuaState; 12 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 13 | #else 14 | using LuaAPI = XLua.LuaDLL.Lua; 15 | using RealStatePtr = System.IntPtr; 16 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 17 | #endif 18 | 19 | using System; 20 | using System.Collections.Generic; 21 | 22 | namespace XLua 23 | { 24 | public partial class LuaFunction : LuaBase 25 | { 26 | public LuaFunction(int reference, LuaEnv luaenv) : base(reference, luaenv) 27 | { 28 | } 29 | 30 | //Action和Func是方便使用的无gc api,如果需要用到out,ref参数,建议使用delegate 31 | //如果需要其它个数的Action和Func, 这个类声明为partial,可以自己加 32 | public void Action(T a) 33 | { 34 | #if THREAD_SAFE || HOTFIX_ENABLE 35 | lock (luaEnv.luaEnvLock) 36 | { 37 | #endif 38 | var L = luaEnv.L; 39 | var translator = luaEnv.translator; 40 | int oldTop = LuaAPI.lua_gettop(L); 41 | int errFunc = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); 42 | LuaAPI.lua_getref(L, luaReference); 43 | translator.PushByType(L, a); 44 | int error = LuaAPI.lua_pcall(L, 1, 0, errFunc); 45 | if (error != 0) 46 | luaEnv.ThrowExceptionFromError(oldTop); 47 | LuaAPI.lua_settop(L, oldTop); 48 | #if THREAD_SAFE || HOTFIX_ENABLE 49 | } 50 | #endif 51 | } 52 | 53 | public TResult Func(T a) 54 | { 55 | #if THREAD_SAFE || HOTFIX_ENABLE 56 | lock (luaEnv.luaEnvLock) 57 | { 58 | #endif 59 | var L = luaEnv.L; 60 | var translator = luaEnv.translator; 61 | int oldTop = LuaAPI.lua_gettop(L); 62 | int errFunc = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); 63 | LuaAPI.lua_getref(L, luaReference); 64 | translator.PushByType(L, a); 65 | int error = LuaAPI.lua_pcall(L, 1, 1, errFunc); 66 | if (error != 0) 67 | luaEnv.ThrowExceptionFromError(oldTop); 68 | TResult ret; 69 | try 70 | { 71 | translator.Get(L, -1, out ret); 72 | } 73 | catch (Exception e) 74 | { 75 | throw e; 76 | } 77 | finally 78 | { 79 | LuaAPI.lua_settop(L, oldTop); 80 | } 81 | return ret; 82 | #if THREAD_SAFE || HOTFIX_ENABLE 83 | } 84 | #endif 85 | } 86 | 87 | public void Action(T1 a1, T2 a2) 88 | { 89 | #if THREAD_SAFE || HOTFIX_ENABLE 90 | lock (luaEnv.luaEnvLock) 91 | { 92 | #endif 93 | var L = luaEnv.L; 94 | var translator = luaEnv.translator; 95 | int oldTop = LuaAPI.lua_gettop(L); 96 | int errFunc = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); 97 | LuaAPI.lua_getref(L, luaReference); 98 | translator.PushByType(L, a1); 99 | translator.PushByType(L, a2); 100 | int error = LuaAPI.lua_pcall(L, 2, 0, errFunc); 101 | if (error != 0) 102 | luaEnv.ThrowExceptionFromError(oldTop); 103 | LuaAPI.lua_settop(L, oldTop); 104 | #if THREAD_SAFE || HOTFIX_ENABLE 105 | } 106 | #endif 107 | } 108 | 109 | public TResult Func(T1 a1, T2 a2) 110 | { 111 | #if THREAD_SAFE || HOTFIX_ENABLE 112 | lock (luaEnv.luaEnvLock) 113 | { 114 | #endif 115 | var L = luaEnv.L; 116 | var translator = luaEnv.translator; 117 | int oldTop = LuaAPI.lua_gettop(L); 118 | int errFunc = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); 119 | LuaAPI.lua_getref(L, luaReference); 120 | translator.PushByType(L, a1); 121 | translator.PushByType(L, a2); 122 | int error = LuaAPI.lua_pcall(L, 2, 1, errFunc); 123 | if (error != 0) 124 | luaEnv.ThrowExceptionFromError(oldTop); 125 | TResult ret; 126 | try 127 | { 128 | translator.Get(L, -1, out ret); 129 | } 130 | catch (Exception e) 131 | { 132 | throw e; 133 | } 134 | finally 135 | { 136 | LuaAPI.lua_settop(L, oldTop); 137 | } 138 | return ret; 139 | #if THREAD_SAFE || HOTFIX_ENABLE 140 | } 141 | #endif 142 | } 143 | 144 | //deprecated 145 | public object[] Call(object[] args, Type[] returnTypes) 146 | { 147 | #if THREAD_SAFE || HOTFIX_ENABLE 148 | lock (luaEnv.luaEnvLock) 149 | { 150 | #endif 151 | int nArgs = 0; 152 | var L = luaEnv.L; 153 | var translator = luaEnv.translator; 154 | int oldTop = LuaAPI.lua_gettop(L); 155 | 156 | int errFunc = LuaAPI.load_error_func(L, luaEnv.errorFuncRef); 157 | LuaAPI.lua_getref(L, luaReference); 158 | if (args != null) 159 | { 160 | nArgs = args.Length; 161 | for (int i = 0; i < args.Length; i++) 162 | { 163 | translator.PushAny(L, args[i]); 164 | } 165 | } 166 | int error = LuaAPI.lua_pcall(L, nArgs, -1, errFunc); 167 | if (error != 0) 168 | luaEnv.ThrowExceptionFromError(oldTop); 169 | 170 | LuaAPI.lua_remove(L, errFunc); 171 | if (returnTypes != null) 172 | return translator.popValues(L, oldTop, returnTypes); 173 | else 174 | return translator.popValues(L, oldTop); 175 | #if THREAD_SAFE || HOTFIX_ENABLE 176 | } 177 | #endif 178 | } 179 | 180 | //deprecated 181 | public object[] Call(params object[] args) 182 | { 183 | return Call(args, null); 184 | } 185 | 186 | public T Cast() 187 | { 188 | if (!typeof(T).IsSubclassOf(typeof(Delegate))) 189 | { 190 | throw new InvalidOperationException(typeof(T).Name + " is not a delegate type"); 191 | } 192 | #if THREAD_SAFE || HOTFIX_ENABLE 193 | lock (luaEnv.luaEnvLock) 194 | { 195 | #endif 196 | var L = luaEnv.L; 197 | var translator = luaEnv.translator; 198 | push(L); 199 | T ret = (T)translator.GetObject(L, -1, typeof(T)); 200 | LuaAPI.lua_pop(luaEnv.L, 1); 201 | return ret; 202 | #if THREAD_SAFE || HOTFIX_ENABLE 203 | } 204 | #endif 205 | } 206 | 207 | public void SetEnv(LuaTable env) 208 | { 209 | #if THREAD_SAFE || HOTFIX_ENABLE 210 | lock (luaEnv.luaEnvLock) 211 | { 212 | #endif 213 | var L = luaEnv.L; 214 | int oldTop = LuaAPI.lua_gettop(L); 215 | push(L); 216 | env.push(L); 217 | LuaAPI.lua_setfenv(L, -2); 218 | LuaAPI.lua_settop(L, oldTop); 219 | #if THREAD_SAFE || HOTFIX_ENABLE 220 | } 221 | #endif 222 | } 223 | 224 | internal override void push(RealStatePtr L) 225 | { 226 | LuaAPI.lua_getref(L, luaReference); 227 | } 228 | 229 | public override string ToString() 230 | { 231 | return "function :" + luaReference; 232 | } 233 | } 234 | 235 | } 236 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaFunction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7c45cd490d853cb409d042c641784718 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/LuaTable.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a4d72d338110544b8538c1a5fd33c11 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/MethodWarpsCache.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5f029e1a01fd984f92bf8d5c2b51923 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/ObjectCasters.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 04cef766c4f15b341bcb4659831e6748 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/ObjectPool.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | using System; 10 | using System.Collections; 11 | using System.Collections.Generic; 12 | 13 | namespace XLua 14 | { 15 | public class ObjectPool 16 | { 17 | const int LIST_END = -1; 18 | const int ALLOCED = -2; 19 | struct Slot 20 | { 21 | public int next; 22 | public object obj; 23 | 24 | public Slot(int next, object obj) 25 | { 26 | this.next = next; 27 | this.obj = obj; 28 | } 29 | } 30 | 31 | private Slot[] list = new Slot[512]; 32 | private int freelist = LIST_END; 33 | private int count = 0; 34 | 35 | public object this[int i] 36 | { 37 | get 38 | { 39 | if (i >= 0 && i < count) 40 | { 41 | return list[i].obj; 42 | } 43 | 44 | return null; 45 | } 46 | } 47 | 48 | public void Clear() 49 | { 50 | freelist = LIST_END; 51 | count = 0; 52 | list = new Slot[512]; 53 | } 54 | 55 | void extend_capacity() 56 | { 57 | Slot[] new_list = new Slot[list.Length * 2]; 58 | for (int i = 0; i < list.Length; i++) 59 | { 60 | new_list[i] = list[i]; 61 | } 62 | list = new_list; 63 | } 64 | 65 | public int Add(object obj) 66 | { 67 | int index = LIST_END; 68 | 69 | if (freelist != LIST_END) 70 | { 71 | index = freelist; 72 | list[index].obj = obj; 73 | freelist = list[index].next; 74 | list[index].next = ALLOCED; 75 | } 76 | else 77 | { 78 | if (count == list.Length) 79 | { 80 | extend_capacity(); 81 | } 82 | index = count; 83 | list[index] = new Slot(ALLOCED, obj); 84 | count = index + 1; 85 | } 86 | 87 | return index; 88 | } 89 | 90 | public bool TryGetValue(int index, out object obj) 91 | { 92 | if (index >= 0 && index < count && list[index].next == ALLOCED) 93 | { 94 | obj = list[index].obj; 95 | return true; 96 | } 97 | 98 | obj = null; 99 | return false; 100 | } 101 | 102 | public object Get(int index) 103 | { 104 | if (index >= 0 && index < count) 105 | { 106 | return list[index].obj; 107 | } 108 | return null; 109 | } 110 | 111 | public object Remove(int index) 112 | { 113 | if (index >= 0 && index < count && list[index].next == ALLOCED) 114 | { 115 | object o = list[index].obj; 116 | list[index].obj = null; 117 | list[index].next = freelist; 118 | freelist = index; 119 | return o; 120 | } 121 | 122 | return null; 123 | } 124 | 125 | public object Replace(int index, object o) 126 | { 127 | if (index >= 0 && index < count) 128 | { 129 | object obj = list[index].obj; 130 | list[index].obj = o; 131 | return obj; 132 | } 133 | 134 | return null; 135 | } 136 | 137 | public int Check(int check_pos, int max_check, Func checker, Dictionary reverse_map) 138 | { 139 | if (count == 0) 140 | { 141 | return 0; 142 | } 143 | for (int i = 0; i < Math.Min(max_check, count); ++i) 144 | { 145 | check_pos %= count; 146 | if (list[check_pos].next == ALLOCED && !Object.ReferenceEquals(list[check_pos].obj, null)) 147 | { 148 | if (!checker(list[check_pos].obj)) 149 | { 150 | object obj = Replace(check_pos, null); 151 | int obj_index; 152 | if (reverse_map.TryGetValue(obj, out obj_index) && obj_index == check_pos) 153 | { 154 | reverse_map.Remove(obj); 155 | } 156 | } 157 | } 158 | ++check_pos; 159 | } 160 | 161 | return check_pos %= count; 162 | } 163 | } 164 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/ObjectPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: acf2cec75841d9646900284e2ba1ca4f 3 | timeCreated: 1480296949 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/ObjectTranslator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41d53bdd4bbda0f41a6bd1eb35af4f99 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/ObjectTranslatorPool.cs: -------------------------------------------------------------------------------- 1 | /* 2 | * Tencent is pleased to support the open source community by making xLua available. 3 | * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved. 4 | * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at 5 | * http://opensource.org/licenses/MIT 6 | * 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. 7 | */ 8 | 9 | #if USE_UNI_LUA 10 | using LuaAPI = UniLua.Lua; 11 | using RealStatePtr = UniLua.ILuaState; 12 | using LuaCSFunction = UniLua.CSharpFunctionDelegate; 13 | #else 14 | using LuaAPI = XLua.LuaDLL.Lua; 15 | using RealStatePtr = System.IntPtr; 16 | using LuaCSFunction = XLua.LuaDLL.lua_CSFunction; 17 | #endif 18 | 19 | using System.Collections.Generic; 20 | using System; 21 | 22 | namespace XLua 23 | { 24 | public class ObjectTranslatorPool 25 | { 26 | private Dictionary translators = new Dictionary(); 27 | 28 | public static ObjectTranslatorPool Instance 29 | { 30 | get 31 | { 32 | return InternalGlobals.objectTranslatorPool; 33 | } 34 | } 35 | 36 | #if UNITY_EDITOR || XLUA_GENERAL 37 | public static ObjectTranslator FindTranslator(RealStatePtr L) 38 | { 39 | return InternalGlobals.objectTranslatorPool.Find(L); 40 | } 41 | #endif 42 | 43 | public ObjectTranslatorPool () 44 | { 45 | } 46 | 47 | public void Add (RealStatePtr L, ObjectTranslator translator) 48 | { 49 | #if THREAD_SAFE || HOTFIX_ENABLE 50 | lock (this) 51 | #endif 52 | { 53 | var ptr = LuaAPI.xlua_gl(L); 54 | lastPtr = ptr; 55 | lastTranslator = translator; 56 | 57 | #if !SINGLE_ENV 58 | translators.Add(ptr , new WeakReference(translator)); 59 | #endif 60 | } 61 | } 62 | 63 | RealStatePtr lastPtr = default(RealStatePtr); 64 | ObjectTranslator lastTranslator = default(ObjectTranslator); 65 | 66 | public ObjectTranslator Find (RealStatePtr L) 67 | { 68 | #if THREAD_SAFE || HOTFIX_ENABLE 69 | lock (this) 70 | #endif 71 | { 72 | #if SINGLE_ENV 73 | return lastTranslator; 74 | #else 75 | var ptr = LuaAPI.xlua_gl(L); 76 | if (lastPtr == ptr) return lastTranslator; 77 | if (translators.ContainsKey(ptr)) 78 | { 79 | lastPtr = ptr; 80 | lastTranslator = translators[ptr].Target as ObjectTranslator; 81 | return lastTranslator; 82 | } 83 | 84 | return null; 85 | #endif 86 | } 87 | } 88 | 89 | public void Remove (RealStatePtr L) 90 | { 91 | #if THREAD_SAFE || HOTFIX_ENABLE 92 | lock (this) 93 | #endif 94 | { 95 | #if SINGLE_ENV 96 | lastPtr = default(RealStatePtr); 97 | lastTranslator = default(ObjectTranslator); 98 | #else 99 | var ptr = LuaAPI.xlua_gl(L); 100 | if (!translators.ContainsKey (ptr)) 101 | return; 102 | 103 | if (lastPtr == ptr) 104 | { 105 | lastPtr = default(RealStatePtr); 106 | lastTranslator = default(ObjectTranslator); 107 | } 108 | 109 | translators.Remove(ptr); 110 | #endif 111 | } 112 | } 113 | } 114 | } 115 | 116 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/ObjectTranslatorPool.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 069f15dde2065491db1e68ca5fb1279d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/RawObject.cs: -------------------------------------------------------------------------------- 1 | namespace XLua 2 | { 3 | public interface RawObject 4 | { 5 | object Target { get; } 6 | } 7 | } 8 | 9 | namespace XLua.Cast 10 | { 11 | public class Any : RawObject 12 | { 13 | T mTarget; 14 | 15 | public Any(T i) 16 | { 17 | mTarget = i; 18 | } 19 | 20 | public object Target 21 | { 22 | get 23 | { 24 | return mTarget; 25 | } 26 | } 27 | } 28 | 29 | public class Byte : Any 30 | { 31 | public Byte(byte i) : base(i) 32 | { 33 | } 34 | } 35 | 36 | public class SByte : Any 37 | { 38 | public SByte(sbyte i) : base(i) 39 | { 40 | } 41 | } 42 | 43 | public class Char : Any 44 | { 45 | public Char(char i) : base(i) 46 | { 47 | } 48 | } 49 | 50 | public class Int16 : Any 51 | { 52 | public Int16(short i) : base(i) 53 | { 54 | } 55 | } 56 | 57 | public class UInt16 : Any 58 | { 59 | public UInt16(ushort i) : base(i) 60 | { 61 | } 62 | } 63 | 64 | public class Int32 : Any 65 | { 66 | public Int32(int i) : base(i) 67 | { 68 | } 69 | } 70 | 71 | public class UInt32 : Any 72 | { 73 | public UInt32(uint i) : base(i) 74 | { 75 | } 76 | } 77 | 78 | public class Int64 : Any 79 | { 80 | public Int64(long i) : base(i) 81 | { 82 | } 83 | } 84 | 85 | public class UInt64 : Any 86 | { 87 | public UInt64(ulong i) : base(i) 88 | { 89 | } 90 | } 91 | 92 | public class Float : Any 93 | { 94 | public Float(float i) : base(i) 95 | { 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/RawObject.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3f2b65020c56dc4985af0768b06c63c 3 | timeCreated: 1498116130 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/SignatureLoader.cs: -------------------------------------------------------------------------------- 1 | #if !UNITY_WSA || UNITY_EDITOR 2 | using System.Security.Cryptography; 3 | #else 4 | using Windows.Security.Cryptography; 5 | using Windows.Security.Cryptography.Core; 6 | #endif 7 | using System; 8 | 9 | namespace XLua 10 | { 11 | public class SignatureLoader 12 | { 13 | private LuaEnv.CustomLoader userLoader; 14 | #if !UNITY_WSA || UNITY_EDITOR 15 | RSACryptoServiceProvider rsa; 16 | SHA1 sha; 17 | #else 18 | AsymmetricKeyAlgorithmProvider rsa; 19 | CryptographicKey key; 20 | #endif 21 | 22 | public SignatureLoader(string publicKey, LuaEnv.CustomLoader loader) 23 | { 24 | #if !UNITY_WSA || UNITY_EDITOR 25 | rsa = new RSACryptoServiceProvider(); 26 | rsa.ImportCspBlob(Convert.FromBase64String(publicKey)); 27 | sha = new SHA1CryptoServiceProvider(); 28 | #else 29 | rsa = AsymmetricKeyAlgorithmProvider.OpenAlgorithm(AsymmetricAlgorithmNames.RsaSignPkcs1Sha1); 30 | key = rsa.ImportPublicKey(CryptographicBuffer.DecodeFromBase64String(publicKey), CryptographicPublicKeyBlobType.Capi1PublicKey); 31 | #endif 32 | userLoader = loader; 33 | } 34 | 35 | 36 | byte[] load_and_verify(ref string filepath) 37 | { 38 | byte[] data = userLoader(ref filepath); 39 | if (data == null) 40 | { 41 | return null; 42 | } 43 | if (data.Length < 128) 44 | { 45 | throw new InvalidProgramException(filepath + " length less than 128!"); 46 | } 47 | 48 | byte[] sig = new byte[128]; 49 | byte[] filecontent = new byte[data.Length - 128]; 50 | Array.Copy(data, sig, 128); 51 | Array.Copy(data, 128, filecontent, 0, filecontent.Length); 52 | 53 | #if !UNITY_WSA || UNITY_EDITOR 54 | if (!rsa.VerifyData(filecontent, sha, sig)) 55 | { 56 | throw new InvalidProgramException(filepath + " has invalid signature!"); 57 | } 58 | #else 59 | if (!CryptographicEngine.VerifySignature(key, CryptographicBuffer.CreateFromByteArray(filecontent), CryptographicBuffer.CreateFromByteArray(sig))) 60 | { 61 | throw new InvalidProgramException(filepath + " has invalid signature!"); 62 | } 63 | #endif 64 | return filecontent; 65 | } 66 | 67 | 68 | public static implicit operator LuaEnv.CustomLoader(SignatureLoader signatureLoader) 69 | { 70 | return signatureLoader.load_and_verify; 71 | } 72 | } 73 | } -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/SignatureLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5dfa9c69dddc18849bd3c1dfc4ac42de 3 | timeCreated: 1489222429 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/StaticLuaCallbacks.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 300ed412007935e45a1546a984b89059 3 | timeCreated: 1469175028 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/TemplateEngine.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f996f6400fcbdd4db02eeab46d9dd1e 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/TemplateEngine/TemplateEngine.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d416b4da0b828854c8e997f0c1ae4072 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/TypeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | 4 | namespace XLua 5 | { 6 | 7 | internal static class TypeExtensions 8 | { 9 | public static bool IsValueType(this Type type) 10 | { 11 | #if !UNITY_WSA || UNITY_EDITOR 12 | return type.IsValueType; 13 | #else 14 | return type.GetTypeInfo().IsValueType; 15 | #endif 16 | } 17 | 18 | public static bool IsEnum(this Type type) 19 | { 20 | #if !UNITY_WSA || UNITY_EDITOR 21 | return type.IsEnum; 22 | #else 23 | return type.GetTypeInfo().IsEnum; 24 | #endif 25 | } 26 | 27 | public static bool IsPrimitive(this Type type) 28 | { 29 | #if !UNITY_WSA || UNITY_EDITOR 30 | return type.IsPrimitive; 31 | #else 32 | return type.GetTypeInfo().IsPrimitive; 33 | #endif 34 | } 35 | 36 | public static bool IsAbstract(this Type type) 37 | { 38 | #if !UNITY_WSA || UNITY_EDITOR 39 | return type.IsAbstract; 40 | #else 41 | return type.GetTypeInfo().IsAbstract; 42 | #endif 43 | } 44 | 45 | public static bool IsSealed(this Type type) 46 | { 47 | #if !UNITY_WSA || UNITY_EDITOR 48 | return type.IsSealed; 49 | #else 50 | return type.GetTypeInfo().IsSealed; 51 | #endif 52 | } 53 | 54 | public static bool IsInterface(this Type type) 55 | { 56 | #if !UNITY_WSA || UNITY_EDITOR 57 | return type.IsInterface; 58 | #else 59 | return type.GetTypeInfo().IsInterface; 60 | #endif 61 | } 62 | 63 | public static bool IsClass(this Type type) 64 | { 65 | #if !UNITY_WSA || UNITY_EDITOR 66 | return type.IsClass; 67 | #else 68 | return type.GetTypeInfo().IsClass; 69 | #endif 70 | } 71 | 72 | public static Type BaseType(this Type type) 73 | { 74 | #if !UNITY_WSA || UNITY_EDITOR 75 | return type.BaseType; 76 | #else 77 | return type.GetTypeInfo().BaseType; 78 | #endif 79 | } 80 | 81 | public static bool IsGenericType(this Type type) 82 | { 83 | #if !UNITY_WSA || UNITY_EDITOR 84 | return type.IsGenericType; 85 | #else 86 | return type.GetTypeInfo().IsGenericType; 87 | #endif 88 | } 89 | 90 | public static bool IsGenericTypeDefinition(this Type type) 91 | { 92 | #if !UNITY_WSA || UNITY_EDITOR 93 | return type.IsGenericTypeDefinition; 94 | #else 95 | return type.GetTypeInfo().IsGenericTypeDefinition; 96 | #endif 97 | } 98 | 99 | #if UNITY_WSA && !UNITY_EDITOR 100 | public static bool IsSubclassOf(this Type type, Type c) 101 | { 102 | return type.GetTypeInfo().IsSubclassOf(c); 103 | } 104 | 105 | public static bool IsDefined(this Type type, Type attributeType, bool inherit) 106 | { 107 | return type.GetTypeInfo().IsDefined(attributeType, inherit); 108 | } 109 | 110 | public static Type[] GetGenericParameterConstraints(this Type type) 111 | { 112 | return type.GetTypeInfo().GetGenericParameterConstraints(); 113 | } 114 | #endif 115 | 116 | public static bool IsNestedPublic(this Type type) 117 | { 118 | #if !UNITY_WSA || UNITY_EDITOR 119 | return type.IsNestedPublic; 120 | #else 121 | return type.GetTypeInfo().IsNestedPublic; 122 | #endif 123 | } 124 | 125 | public static bool IsPublic(this Type type) 126 | { 127 | #if !UNITY_WSA || UNITY_EDITOR 128 | return type.IsPublic; 129 | #else 130 | return type.GetTypeInfo().IsPublic; 131 | #endif 132 | } 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/TypeExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0099a231859d6da43932d0c36714e17f 3 | timeCreated: 1489998065 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/ThirdParty/XLua/Src/Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9c14a5b76adb7d41926526af904beda 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Süleyman Yasir KULA 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LibSource/AAR Source (Android)/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /LibSource/AAR Source (Android)/LogcatLogReceiver.java: -------------------------------------------------------------------------------- 1 | package com.yasirkula.unity; 2 | 3 | /** 4 | * Created by yasirkula on 7.11.2017. 5 | */ 6 | 7 | public interface LogcatLogReceiver 8 | { 9 | void OnLogReceived( String log ); 10 | } 11 | -------------------------------------------------------------------------------- /LibSource/AAR Source (Android)/LogcatLogger.java: -------------------------------------------------------------------------------- 1 | package com.yasirkula.unity; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.IOException; 5 | import java.io.InputStreamReader; 6 | 7 | /** 8 | * Created by yasirkula on 7.11.2017. 9 | */ 10 | 11 | public class LogcatLogger 12 | { 13 | private static class LogcatWorker implements Runnable 14 | { 15 | private LogcatLogReceiver logReceiver; 16 | private String command; 17 | 18 | private volatile boolean running = true; 19 | 20 | public LogcatWorker( LogcatLogReceiver logReceiver, String command ) 21 | { 22 | this.logReceiver = logReceiver; 23 | this.command = command; 24 | } 25 | 26 | @Override 27 | public void run() 28 | { 29 | // Credit: http://chintanrathod.com/read-logs-programmatically-in-android/ 30 | try 31 | { 32 | Runtime.getRuntime().exec( "logcat -c" ); 33 | 34 | Process process = Runtime.getRuntime().exec( command ); 35 | BufferedReader bufferedReader = new BufferedReader( new InputStreamReader( process.getInputStream() ) ); 36 | 37 | String line; 38 | while( running ) 39 | { 40 | while( ( line = bufferedReader.readLine() ) != null ) 41 | logReceiver.OnLogReceived( line ); 42 | 43 | try 44 | { 45 | Thread.sleep( 1000L ); 46 | } 47 | catch( InterruptedException e ) 48 | { 49 | } 50 | } 51 | } 52 | catch( IOException e ) 53 | { 54 | } 55 | } 56 | 57 | public void terminate() 58 | { 59 | running = false; 60 | } 61 | } 62 | 63 | private LogcatWorker worker; 64 | 65 | public void Start( LogcatLogReceiver logReceiver, String arguments ) 66 | { 67 | Stop(); 68 | 69 | if( logReceiver == null ) 70 | return; 71 | 72 | String command = "logcat"; 73 | if( arguments != null ) 74 | { 75 | arguments = arguments.trim(); 76 | if( arguments.length() > 0 ) 77 | command += " " + arguments; 78 | } 79 | 80 | worker = new LogcatWorker( logReceiver, command ); 81 | Thread thread = new Thread( worker ); 82 | thread.start(); 83 | } 84 | 85 | public void Stop() 86 | { 87 | if( worker != null ) 88 | { 89 | worker.terminate(); 90 | worker = null; 91 | } 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /LibSource/Images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/LibSource/Images/1.png -------------------------------------------------------------------------------- /LibSource/Images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/LibSource/Images/2.png -------------------------------------------------------------------------------- /LibSource/Images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/LibSource/Images/3.png -------------------------------------------------------------------------------- /LibSource/Images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/LibSource/Images/4.png -------------------------------------------------------------------------------- /LibSource/Images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/LibSource/Images/5.png -------------------------------------------------------------------------------- /LibSource/Images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/leinlin/UnityIngameDebugConsole/2afe38ce19c3a9229c493adf4fb77108c26fe69a/LibSource/Images/6.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Unity 3D 游戏内部控制台 2 | 3 | ### 呼出 4 | 按住屏幕,逆时针画圈圈即可呼出界面 5 | 6 | ### 控制台界面 7 | ![popup](LibSource/Images/1.png) 8 | 9 | 本插件UI使用的是UGUI,不必担心版本更新的问题,手机平台上也正常运行。原作者编写的循环列表效率很好,B格也贼高。于是在基础上改了改ui,以及加入了xlua脚本调用。 10 | 11 | 原github地址:https://github.com/yasirkula/UnityIngameDebugConsole.git 12 | ### 运行指令 13 | 14 | 你可以输入指令"*help*"来获取所有的注册的指令,同时装载了xlua的功能,你可以以"*lua:*"后面跟上**xlua**的脚本可以操作C#这边几乎所有的函数 15 | 16 | 你也可以通过 **ConsoleMethodAttribute**这个Attribute来注册一些指令,建议使用静态函数进行标记。 17 | 18 | 函数支持一些参数: 19 | 20 | **Primitive types, string, Vector2, Vector3, Vector4, GameObject** 21 | 22 | 例子代码: 23 | ```csharp 24 | using UnityEngine; 25 | using IngameDebugConsole; 26 | 27 | public class TestScript : MonoBehaviour 28 | { 29 | [ConsoleMethod( "cube", "Creates a cube at specified position" )] 30 | public static void CreateCubeAt( Vector3 position ) 31 | { 32 | GameObject.CreatePrimitive( PrimitiveType.Cube ).transform.position = position; 33 | } 34 | } 35 | ``` 36 | 37 | 然后在控制台输入`cube [0 2.5 0]`即可在position (0,2.5,0)的位置上创建一个Cube. 38 | 39 | 40 | 控制台指令参数输入注意事项: 41 | 42 | - float类型的数字不要以f结尾 43 | - string类型的参数要用("")装载起来 44 | - vector2~4的变量使用 ( [] ) 或者 ( () )装载 45 | 46 | 参数的一些默认选项: 47 | 48 | - 你可以使用 [] 来代表Vector.zero 49 | - 你可以使用1代表true,0代表false 50 | 51 | 游戏内部要注销指令可以使用代码 52 | ```csharp 53 | DebugLogConsole.RemoveCommand( string command ) 54 | ``` 55 | 56 | **xlua**的使用详见:https://github.com/Tencent/xLua 57 | 58 | lua控制台例子: 59 | ```lua 60 | lua: 61 | CS.UnityEngine.Debug.Log("13224") 62 | ``` 63 | 64 | lua代码使用注意事项: 65 | 66 | 每一次运行lua都会新建一个虚拟机,执行完毕后就销毁,所以不要注册啥全局函数 67 | ```csharp 68 | var env = new XLua.LuaEnv(); 69 | env.DoString(command.Substring(4)); 70 | env.Dispose(); 71 | ``` 72 | 如果要使用虚拟机调用游戏内部的lua函数请使用函数将规则加到控制台中: 73 | ```csharp 74 | DebugLogConsole.AddCommondRuleAction(your rule) 75 | ``` 76 | 77 | ### 操作指引 78 | 打开example中的consle.unity场景 79 | 使用回车键可以扩大输入框 80 | Ctrl+回车键 或者点击发送按钮执行指令 81 | 手机上从电脑上发送信息上来,然后粘贴进去吧 82 | 83 | #### 运行lua代码 84 | ![popup](LibSource/Images/5.png) 85 | 86 | ![popup](LibSource/Images/6.png) 87 | 88 | #### 运行指令代码 89 | ![popup](LibSource/Images/4.png) -------------------------------------------------------------------------------- /UnityPackageManager/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | --------------------------------------------------------------------------------