├── .gitignore ├── LICENSE ├── README.md └── UnityProject ├── Assets ├── 3rd │ ├── InfiniteScroll │ │ ├── Prefabs.meta │ │ ├── Prefabs │ │ │ ├── ListItem.prefab │ │ │ ├── ListItem.prefab.meta │ │ │ ├── OpenSans.asset │ │ │ ├── OpenSans.asset.meta │ │ │ ├── ScrollViewHorizontal.prefab │ │ │ ├── ScrollViewHorizontal.prefab.meta │ │ │ ├── ScrollViewVertical.prefab │ │ │ └── ScrollViewVertical.prefab.meta │ │ ├── Scenes.meta │ │ ├── Scenes │ │ │ ├── Demo1.unity │ │ │ ├── Demo1.unity.meta │ │ │ ├── Demo2.unity │ │ │ ├── Demo2.unity.meta │ │ │ ├── Demo3.unity │ │ │ ├── Demo3.unity.meta │ │ │ ├── Demo4.unity │ │ │ ├── Demo4.unity.meta │ │ │ ├── Demo5.unity │ │ │ └── Demo5.unity.meta │ │ ├── Scripts.meta │ │ └── Scripts │ │ │ ├── Demo1.cs │ │ │ ├── Demo1.cs.meta │ │ │ ├── Demo2.cs │ │ │ ├── Demo2.cs.meta │ │ │ ├── Demo3.cs │ │ │ ├── Demo3.cs.meta │ │ │ ├── Demo4.cs │ │ │ ├── Demo4.cs.meta │ │ │ ├── Demo5.cs │ │ │ ├── Demo5.cs.meta │ │ │ ├── InfiniteScroll.meta │ │ │ └── InfiniteScroll │ │ │ ├── Editor.meta │ │ │ ├── Editor │ │ │ ├── InfiniteScrollEditor.cs │ │ │ └── InfiniteScrollEditor.cs.meta │ │ │ ├── InfiniteScroll.cs │ │ │ └── InfiniteScroll.cs.meta │ └── MetaJUI │ │ ├── Editor.meta │ │ └── Editor │ │ ├── UIAutoCreate.meta │ │ └── UIAutoCreate │ │ ├── Template.meta │ │ ├── Template │ │ ├── UIControlTemplate.txt │ │ ├── UIControlTemplate.txt.meta │ │ ├── UIModelTemplate.txt │ │ ├── UIModelTemplate.txt.meta │ │ ├── UIViewAutoCreateConfig.asset │ │ ├── UIViewAutoCreateConfig.asset.meta │ │ ├── UIViewTemplate.txt │ │ └── UIViewTemplate.txt.meta │ │ ├── UIAutoCreatePathSetting.cs │ │ ├── UIAutoCreatePathSetting.cs.meta │ │ ├── UIControlAutoCreate.cs │ │ ├── UIControlAutoCreate.cs.meta │ │ ├── UIModelAutoCreate.cs │ │ ├── UIModelAutoCreate.cs.meta │ │ ├── UIScriptAutoCreateEditorWindow.cs │ │ ├── UIScriptAutoCreateEditorWindow.cs.meta │ │ ├── UIViewAutoCreate.cs │ │ ├── UIViewAutoCreate.cs.meta │ │ ├── UIViewAutoCreateConfig.cs │ │ ├── UIViewAutoCreateConfig.cs.meta │ │ ├── readme.txt │ │ └── readme.txt.meta └── HotUpdateResources │ └── UI │ ├── UITemplate.prefab │ └── UITemplate.prefab.meta └── HotUpdateScripts └── MetaFramework ├── Singleton ├── MonoSingletonTemplate.cs └── SingletonTemplate.cs └── UI ├── BindingData.cs ├── Interface ├── IUIBase.cs ├── IUIModel.cs └── IUIView.cs ├── RedPoint ├── RedPointNode.cs └── RedPointSystems.cs ├── UIBase.cs ├── UILayer.cs ├── UIManager.cs └── UITool.cs /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | 13 | # Asset meta data should only be ignored when the corresponding asset is also ignored 14 | !/[Aa]ssets/**/*.meta 15 | 16 | # Uncomment this line if you wish to ignore the asset store tools plugin 17 | # /[Aa]ssets/AssetStoreTools* 18 | 19 | # Autogenerated Jetbrains Rider plugin 20 | [Aa]ssets/Plugins/Editor/JetBrains* 21 | 22 | # Visual Studio cache directory 23 | .vs/ 24 | 25 | # Gradle cache directory 26 | .gradle/ 27 | 28 | # Autogenerated VS/MD/Consulo solution and project files 29 | ExportedObj/ 30 | .consulo/ 31 | *.csproj 32 | *.unityproj 33 | *.sln 34 | *.suo 35 | *.tmp 36 | *.user 37 | *.userprefs 38 | *.pidb 39 | *.booproj 40 | *.svd 41 | *.pdb 42 | *.mdb 43 | *.opendb 44 | *.VC.db 45 | 46 | # Unity3D generated meta files 47 | *.pidb.meta 48 | *.pdb.meta 49 | *.mdb.meta 50 | 51 | # Unity3D generated file on crash reports 52 | sysinfo.txt 53 | 54 | # Builds 55 | *.apk 56 | *.unitypackage 57 | 58 | # Crashlytics generated file 59 | crashlytics-build.properties 60 | 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Meta404Dev 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # MetaJUI v0.4 5 | 6 | MetaJUI是为JEngine定制的UI框架,当然你也可以通过很简单的修改,移植到自己的工程项目 7 | 8 | # 快速使用 9 | 10 | ## 1.导入到项目 11 | 12 | 将 **UnityProject** 目录的下的所有文件全部Copy到自己的Unity工程目录下 13 | 14 | ## 2.创建自己的UI预制体 15 | 16 | 打开Unity,点击上方的 **MetaTools/UI自动生成器** (快捷键:Ctrl+Shift+Alt+U) 17 | 18 | - 在预制体自动生成设置中,输入你想要创建的UI名字,这里我们以 **UITest** 为例 19 | - 输入完成后,点击 **生成UI预制体** 按钮,此时,在路径**Assets/HotUpdateResources/UI/** 中会出现刚才生成的UI预制体 20 | - 编辑UI,具体的UI控件的命名规则查看 **Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIViewAutoCreateConfig** 21 | 22 | ## 3.自动生成代码 23 | - 把UI预制体拖到View根节点处 24 | - 如果是第一次生成代码,点击 **生成MVC代码** ,如果生成成功,日志窗口会打印出生成的代码路径,默认的代码生成路径在 **/HotUpdateScripts/Game/UI/** 25 | - 如果你用的是VisualStudio,需要在解决方案资源管理器中点击**刷新**,点击**显示所有文件**,然后右键文件夹**包括在项目中** 26 | - 27 | ## 4.游戏中的使用方法 28 | 29 | 打开普通UI 30 | ``` 31 | UITool.Open(); 32 | ``` 33 | 34 | 关闭普通UI 35 | ``` 36 | UITool.Close(); 37 | ``` 38 | 39 | 打开栈UI 40 | ``` 41 | UITool.OpenStack(); 42 | UITool.OpenStack(); 43 | UITool.OpenStack(); 44 | ``` 45 | 关闭栈UI 46 | ``` 47 | UITool.CloseStack(); 48 | UITool.CloseStack(); 49 | UITool.CloseStack(); 50 | ``` 51 | 获取到一个UI 52 | ``` 53 | UITool.Get(); 54 | ``` 55 | 清除所有UI,包括缓存 56 | ``` 57 | UITool.Clear(); 58 | ``` 59 | 60 | ## 5.自定义路径 61 | 62 | 打开**Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIAutoCreatePathSetting** 63 | 所有路径都可以自定义修改 64 | 65 | ## 6.修改UI生成代码模板 66 | 67 | 模板文件在**Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/** 目录下 68 | 可以自由修改为你想要的模板 69 | 70 | ## 7.使用虚拟列表 71 | 72 | 因为热更层使用到了框架层的委托类型,第一次使用要进行ILRuntime的委托注册 73 | RegisterMethodDelegateHelper.Register() 74 | ``` 75 | appdomain.DelegateManager.RegisterMethodDelegate(); 76 | ``` 77 | RegisterFunctionDelegateHelper.Register() 78 | ``` 79 | appdomain.DelegateManager.RegisterFunctionDelegate(); 80 | ``` 81 | 82 | 设置好虚拟列表预制体**ScrollViewVertical** 83 | 84 | 在热更层的UI打开界面进行注册 85 | 86 | 注册高度 87 | ``` 88 | GetView().scrollTestRect.OnHeight += (index) => { return 150; }; 89 | ``` 90 | 注册刷新事件 91 | ``` 92 | GetView().scrollTestRect.OnFill += (index, go) => 93 | { 94 | go.GetComponentInChildren().text = index.ToString(); 95 | }; 96 | ``` 97 | 初始化列表大小 98 | ``` 99 | GetView().scrollTestRect.InitData(100); 100 | ``` 101 | 102 | 103 | 104 | ## 8.使用公共UI 105 | 106 | 公共UI需要以**UICommon**前缀命名,生成的代码也会将UI预制体的名字作为类名,所以需要避免重复 107 | - 将公共UI作为一个单独的预制体进行编辑 108 | - 编辑完了将公共UI拖入你想要的目标UI下面 109 | - 生成公共UI的MVC代码 110 | - 生成目标UI的View代码 111 | 112 | 113 | ## 9.使用红点系统 114 | 115 | 初始化结构(以我自己的项目为例, RedPointSystemConst为一个枚举) 116 | ``` 117 | RedPointNode mainNode = new RedPointNode(RedPointSystemConst.main.ToString()); 118 | { 119 | //家园 120 | RedPointNode jiayuanNode = mainNode.AddChildNode(RedPointSystemConst.家园.ToString()); 121 | { 122 | //仓库 123 | RedPointNode cangkuNode = jiayuanNode.AddChildNode(RedPointSystemConst.家园_仓库.ToString()); 124 | { 125 | cangkuNode.AddChildNode(RedPointSystemConst.家园_仓库_装备.ToString()); 126 | } 127 | 128 | //孵化槽 129 | RedPointNode fuhuacaoNode = jiayuanNode.AddChildNode(RedPointSystemConst.家园_孵化槽.ToString()); 130 | { 131 | fuhuacaoNode.AddChildNode(RedPointSystemConst.家园_孵化槽_孵化蛋.ToString()); 132 | fuhuacaoNode.AddChildNode(RedPointSystemConst.家园_孵化槽_抽奖券.ToString()); 133 | fuhuacaoNode.AddChildNode(RedPointSystemConst.家园_孵化槽_配对.ToString()); 134 | } 135 | } 136 | 137 | //宠物 138 | RedPointNode chongwuNode = mainNode.AddChildNode(RedPointSystemConst.宠物.ToString()); 139 | { 140 | //宠物卡片 141 | RedPointNode kapianNode = chongwuNode.AddChildNode(RedPointSystemConst.宠物_卡片.ToString()); 142 | { 143 | RedPointNode kapianshuxingNode = kapianNode.AddChildNode(RedPointSystemConst.宠物_卡片_详情属性.ToString()); 144 | { 145 | kapianshuxingNode.AddChildNode(RedPointSystemConst.宠物_卡片_详情属性_升级.ToString()); 146 | } 147 | kapianNode.AddChildNode(RedPointSystemConst.宠物_卡片_详情进化.ToString()); 148 | kapianNode.AddChildNode(RedPointSystemConst.宠物_卡片_详情觉醒.ToString()); 149 | } 150 | } 151 | } 152 | 153 | rps = new RedPointSystems(); 154 | rps.Init(mainNode); 155 | ``` 156 | 157 | 注册红点数量变化事件 158 | ``` 159 | 160 | RedPointSystemManager.Ins.rps.Register(RedPointSystemConst.家园.ToString(), (node) => 161 | { 162 | ShowRedPoint(node.pointCount > 0); 163 | }); 164 | 165 | ... 166 | 167 | RedPointSystemManager.Ins.rps.Register(RedPointSystemConst.家园_仓库.ToString(), (node) => 168 | { 169 | ShowRedPoint(node.pointCount > 0); 170 | }); 171 | 172 | ... 173 | 174 | RedPointSystemManager.Ins.rps.Register(RedPointSystemConst.家园_仓库_装备.ToString(), (node) => 175 | { 176 | ShowRedPoint(node.pointCount > 0); 177 | }); 178 | ``` 179 | 派发事件 180 | ``` 181 | 182 | RedPointSystemManager.Ins.rps.Dispatch( 183 | RedPointSystemConst.家园_仓库_装备.ToString(), 184 | PlayerData.GetNewItemData()); 185 | 186 | ``` 187 | 188 | # MetaJUI优势 189 | - 使用简单,自动生成UI预制体,自动生成UI代码 190 | - 可以自定义UI模板 191 | - UI代码完全脱离Monobehavior,可以轻松的完成热更 192 | 193 | # 更新日志 194 | ## v0.4(2022.4.5) 195 | - 新增了虚拟列表 196 | - 新增了公共UI 197 | - 新增了红点系统 198 | 199 | 200 | # TodoList 201 | - 新手引导系统 202 | - 常用的UI集合 203 | - UI确认框 204 | - UI消息Tip 205 | - 对话框系统 206 | - 任务系统 207 | 208 | # 支持我 209 | - 通过支付宝请我喝一杯奶茶(支付宝账号:463056265@qq.com) 210 | - 点击Star,你们的Star是我更新的动力 211 | 212 | # 友情链接 213 | [JEngine](https://github.com/JasonXuDeveloper/JEngine) 小白也能快速上手,轻松制作可以热更新的游戏 214 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f07846bcfcf94e144aba5179bb149480 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs/ListItem.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_SourcePrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1213794582161676} 13 | m_IsPrefabAsset: 1 14 | --- !u!1 &1213794582161676 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_CorrespondingSourceObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 6 20 | m_Component: 21 | - component: {fileID: 224987539535312474} 22 | - component: {fileID: 222212662094385272} 23 | - component: {fileID: 114215457755591672} 24 | m_Layer: 5 25 | m_Name: ListItem 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1736957310221334 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_CorrespondingSourceObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 6 37 | m_Component: 38 | - component: {fileID: 224159011440667706} 39 | - component: {fileID: 222445604379121630} 40 | - component: {fileID: 114057751397873620} 41 | m_Layer: 5 42 | m_Name: Text 43 | m_TagString: Untagged 44 | m_Icon: {fileID: 0} 45 | m_NavMeshLayer: 0 46 | m_StaticEditorFlags: 0 47 | m_IsActive: 1 48 | --- !u!114 &114057751397873620 49 | MonoBehaviour: 50 | m_ObjectHideFlags: 1 51 | m_CorrespondingSourceObject: {fileID: 0} 52 | m_PrefabInternal: {fileID: 100100000} 53 | m_GameObject: {fileID: 1736957310221334} 54 | m_Enabled: 1 55 | m_EditorHideFlags: 0 56 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 57 | m_Name: 58 | m_EditorClassIdentifier: 59 | m_Material: {fileID: 0} 60 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 61 | m_RaycastTarget: 1 62 | m_OnCullStateChanged: 63 | m_PersistentCalls: 64 | m_Calls: [] 65 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 66 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 67 | m_FontData: 68 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 69 | m_FontSize: 40 70 | m_FontStyle: 0 71 | m_BestFit: 0 72 | m_MinSize: 2 73 | m_MaxSize: 40 74 | m_Alignment: 4 75 | m_AlignByGeometry: 0 76 | m_RichText: 1 77 | m_HorizontalOverflow: 0 78 | m_VerticalOverflow: 0 79 | m_LineSpacing: 1 80 | m_Text: 81 | --- !u!114 &114215457755591672 82 | MonoBehaviour: 83 | m_ObjectHideFlags: 1 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInternal: {fileID: 100100000} 86 | m_GameObject: {fileID: 1213794582161676} 87 | m_Enabled: 1 88 | m_EditorHideFlags: 0 89 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 90 | m_Name: 91 | m_EditorClassIdentifier: 92 | m_Material: {fileID: 0} 93 | m_Color: {r: 1, g: 1, b: 1, a: 1} 94 | m_RaycastTarget: 0 95 | m_OnCullStateChanged: 96 | m_PersistentCalls: 97 | m_Calls: [] 98 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 99 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 100 | m_Sprite: {fileID: 0} 101 | m_Type: 0 102 | m_PreserveAspect: 0 103 | m_FillCenter: 1 104 | m_FillMethod: 4 105 | m_FillAmount: 1 106 | m_FillClockwise: 1 107 | m_FillOrigin: 0 108 | --- !u!222 &222212662094385272 109 | CanvasRenderer: 110 | m_ObjectHideFlags: 1 111 | m_CorrespondingSourceObject: {fileID: 0} 112 | m_PrefabInternal: {fileID: 100100000} 113 | m_GameObject: {fileID: 1213794582161676} 114 | m_CullTransparentMesh: 0 115 | --- !u!222 &222445604379121630 116 | CanvasRenderer: 117 | m_ObjectHideFlags: 1 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInternal: {fileID: 100100000} 120 | m_GameObject: {fileID: 1736957310221334} 121 | m_CullTransparentMesh: 0 122 | --- !u!224 &224159011440667706 123 | RectTransform: 124 | m_ObjectHideFlags: 1 125 | m_CorrespondingSourceObject: {fileID: 0} 126 | m_PrefabInternal: {fileID: 100100000} 127 | m_GameObject: {fileID: 1736957310221334} 128 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 129 | m_LocalPosition: {x: 0, y: 0, z: 0} 130 | m_LocalScale: {x: 1, y: 1, z: 1} 131 | m_Children: [] 132 | m_Father: {fileID: 224987539535312474} 133 | m_RootOrder: 0 134 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 135 | m_AnchorMin: {x: 0, y: 0} 136 | m_AnchorMax: {x: 1, y: 1} 137 | m_AnchoredPosition: {x: 0, y: 0} 138 | m_SizeDelta: {x: 0, y: 0} 139 | m_Pivot: {x: 0.5, y: 0.5} 140 | --- !u!224 &224987539535312474 141 | RectTransform: 142 | m_ObjectHideFlags: 1 143 | m_CorrespondingSourceObject: {fileID: 0} 144 | m_PrefabInternal: {fileID: 100100000} 145 | m_GameObject: {fileID: 1213794582161676} 146 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 147 | m_LocalPosition: {x: 0, y: 0, z: 0} 148 | m_LocalScale: {x: 1, y: 1, z: 1} 149 | m_Children: 150 | - {fileID: 224159011440667706} 151 | m_Father: {fileID: 0} 152 | m_RootOrder: 0 153 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 154 | m_AnchorMin: {x: 0, y: 1} 155 | m_AnchorMax: {x: 1, y: 1} 156 | m_AnchoredPosition: {x: 0, y: 0} 157 | m_SizeDelta: {x: 0, y: 150} 158 | m_Pivot: {x: 0.5, y: 1} 159 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs/ListItem.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b3be0441af2d548b68eb12fb02c3c0b4 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 100100000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs/OpenSans.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8c90286d549d4f11a8ef619f1631209 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 0 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs/ScrollViewHorizontal.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &3493434002171407136 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 3493434002171407139} 12 | - component: {fileID: 3493434002171407140} 13 | - component: {fileID: 3493434002171407141} 14 | - component: {fileID: 3493434002171407138} 15 | m_Layer: 5 16 | m_Name: Viewport 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!224 &3493434002171407139 23 | RectTransform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 3493434002171407136} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_ConstrainProportionsScale: 0 33 | m_Children: 34 | - {fileID: 3493434002290382153} 35 | m_Father: {fileID: 3493434002624861598} 36 | m_RootOrder: 0 37 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 38 | m_AnchorMin: {x: 0, y: 0} 39 | m_AnchorMax: {x: 1, y: 1} 40 | m_AnchoredPosition: {x: 0, y: 0} 41 | m_SizeDelta: {x: 0, y: 0} 42 | m_Pivot: {x: 0, y: 1} 43 | --- !u!222 &3493434002171407140 44 | CanvasRenderer: 45 | m_ObjectHideFlags: 0 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInstance: {fileID: 0} 48 | m_PrefabAsset: {fileID: 0} 49 | m_GameObject: {fileID: 3493434002171407136} 50 | m_CullTransparentMesh: 0 51 | --- !u!114 &3493434002171407141 52 | MonoBehaviour: 53 | m_ObjectHideFlags: 0 54 | m_CorrespondingSourceObject: {fileID: 0} 55 | m_PrefabInstance: {fileID: 0} 56 | m_PrefabAsset: {fileID: 0} 57 | m_GameObject: {fileID: 3493434002171407136} 58 | m_Enabled: 1 59 | m_EditorHideFlags: 0 60 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 61 | m_Name: 62 | m_EditorClassIdentifier: 63 | m_Material: {fileID: 0} 64 | m_Color: {r: 1, g: 1, b: 1, a: 1} 65 | m_RaycastTarget: 1 66 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 67 | m_Maskable: 1 68 | m_OnCullStateChanged: 69 | m_PersistentCalls: 70 | m_Calls: [] 71 | m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} 72 | m_Type: 1 73 | m_PreserveAspect: 0 74 | m_FillCenter: 1 75 | m_FillMethod: 4 76 | m_FillAmount: 1 77 | m_FillClockwise: 1 78 | m_FillOrigin: 0 79 | m_UseSpriteMesh: 0 80 | m_PixelsPerUnitMultiplier: 1 81 | --- !u!114 &3493434002171407138 82 | MonoBehaviour: 83 | m_ObjectHideFlags: 0 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInstance: {fileID: 0} 86 | m_PrefabAsset: {fileID: 0} 87 | m_GameObject: {fileID: 3493434002171407136} 88 | m_Enabled: 1 89 | m_EditorHideFlags: 0 90 | m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} 91 | m_Name: 92 | m_EditorClassIdentifier: 93 | m_Padding: {x: 0, y: 0, z: 0, w: 0} 94 | m_Softness: {x: 0, y: 0} 95 | --- !u!1 &3493434002290382150 96 | GameObject: 97 | m_ObjectHideFlags: 0 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInstance: {fileID: 0} 100 | m_PrefabAsset: {fileID: 0} 101 | serializedVersion: 6 102 | m_Component: 103 | - component: {fileID: 3493434002290382153} 104 | m_Layer: 5 105 | m_Name: Content 106 | m_TagString: Untagged 107 | m_Icon: {fileID: 0} 108 | m_NavMeshLayer: 0 109 | m_StaticEditorFlags: 0 110 | m_IsActive: 1 111 | --- !u!224 &3493434002290382153 112 | RectTransform: 113 | m_ObjectHideFlags: 0 114 | m_CorrespondingSourceObject: {fileID: 0} 115 | m_PrefabInstance: {fileID: 0} 116 | m_PrefabAsset: {fileID: 0} 117 | m_GameObject: {fileID: 3493434002290382150} 118 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 119 | m_LocalPosition: {x: 0, y: 0, z: 0} 120 | m_LocalScale: {x: 1, y: 1, z: 1} 121 | m_ConstrainProportionsScale: 0 122 | m_Children: [] 123 | m_Father: {fileID: 3493434002171407139} 124 | m_RootOrder: 0 125 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 126 | m_AnchorMin: {x: 0, y: 0} 127 | m_AnchorMax: {x: 0, y: 1} 128 | m_AnchoredPosition: {x: 0, y: 0} 129 | m_SizeDelta: {x: 300, y: 0} 130 | m_Pivot: {x: 0, y: 0.5} 131 | --- !u!1 &3493434002624861599 132 | GameObject: 133 | m_ObjectHideFlags: 0 134 | m_CorrespondingSourceObject: {fileID: 0} 135 | m_PrefabInstance: {fileID: 0} 136 | m_PrefabAsset: {fileID: 0} 137 | serializedVersion: 6 138 | m_Component: 139 | - component: {fileID: 3493434002624861598} 140 | - component: {fileID: 3493434002624861569} 141 | - component: {fileID: 3493434002624861568} 142 | m_Layer: 5 143 | m_Name: ScrollViewHorizontal 144 | m_TagString: Untagged 145 | m_Icon: {fileID: 0} 146 | m_NavMeshLayer: 0 147 | m_StaticEditorFlags: 0 148 | m_IsActive: 1 149 | --- !u!224 &3493434002624861598 150 | RectTransform: 151 | m_ObjectHideFlags: 0 152 | m_CorrespondingSourceObject: {fileID: 0} 153 | m_PrefabInstance: {fileID: 0} 154 | m_PrefabAsset: {fileID: 0} 155 | m_GameObject: {fileID: 3493434002624861599} 156 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 157 | m_LocalPosition: {x: 0, y: 0, z: 0} 158 | m_LocalScale: {x: 1, y: 1, z: 1} 159 | m_ConstrainProportionsScale: 0 160 | m_Children: 161 | - {fileID: 3493434002171407139} 162 | m_Father: {fileID: 0} 163 | m_RootOrder: 0 164 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 165 | m_AnchorMin: {x: 0, y: 0} 166 | m_AnchorMax: {x: 1, y: 1} 167 | m_AnchoredPosition: {x: 0, y: -50} 168 | m_SizeDelta: {x: 0, y: -100} 169 | m_Pivot: {x: 0.5, y: 0.5} 170 | --- !u!114 &3493434002624861569 171 | MonoBehaviour: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | m_GameObject: {fileID: 3493434002624861599} 177 | m_Enabled: 1 178 | m_EditorHideFlags: 0 179 | m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} 180 | m_Name: 181 | m_EditorClassIdentifier: 182 | m_Content: {fileID: 3493434002290382153} 183 | m_Horizontal: 1 184 | m_Vertical: 0 185 | m_MovementType: 1 186 | m_Elasticity: 0.1 187 | m_Inertia: 1 188 | m_DecelerationRate: 0.135 189 | m_ScrollSensitivity: 1 190 | m_Viewport: {fileID: 3493434002171407139} 191 | m_HorizontalScrollbar: {fileID: 0} 192 | m_VerticalScrollbar: {fileID: 0} 193 | m_HorizontalScrollbarVisibility: 2 194 | m_VerticalScrollbarVisibility: 2 195 | m_HorizontalScrollbarSpacing: -3 196 | m_VerticalScrollbarSpacing: -3 197 | m_OnValueChanged: 198 | m_PersistentCalls: 199 | m_Calls: [] 200 | --- !u!114 &3493434002624861568 201 | MonoBehaviour: 202 | m_ObjectHideFlags: 0 203 | m_CorrespondingSourceObject: {fileID: 0} 204 | m_PrefabInstance: {fileID: 0} 205 | m_PrefabAsset: {fileID: 0} 206 | m_GameObject: {fileID: 3493434002624861599} 207 | m_Enabled: 1 208 | m_EditorHideFlags: 0 209 | m_Script: {fileID: 11500000, guid: d584a012d92e744e19fbad8784a4a909, type: 3} 210 | m_Name: 211 | m_EditorClassIdentifier: 212 | Prefab: {fileID: 1213794582161676, guid: b3be0441af2d548b68eb12fb02c3c0b4, type: 3} 213 | TopPadding: 10 214 | BottomPadding: 10 215 | LeftPadding: 10 216 | RightPadding: 10 217 | ItemSpacing: 2 218 | LabelsFont: {fileID: 11400000, guid: a8c90286d549d4f11a8ef619f1631209, type: 2} 219 | TopPullLabel: Pull to refresh 220 | TopReleaseLabel: Release to load 221 | BottomPullLabel: Pull to refresh 222 | BottomReleaseLabel: Release to load 223 | LeftPullLabel: Pull to refresh 224 | LeftReleaseLabel: Release to load 225 | RightPullLabel: Pull to refresh 226 | RightReleaseLabel: Release to load 227 | IsPullTop: 1 228 | IsPullBottom: 1 229 | IsPullLeft: 1 230 | IsPullRight: 1 231 | PullValue: 1.5 232 | LabelOffset: 85 233 | TopLabel: {fileID: 0} 234 | BottomLabel: {fileID: 0} 235 | LeftLabel: {fileID: 0} 236 | RightLabel: {fileID: 0} 237 | Type: 1 238 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs/ScrollViewHorizontal.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2a1b0f8d398794b4fb52da7066c96dd8 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs/ScrollViewVertical.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &6658992592661552 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 6658992592661555} 12 | - component: {fileID: 6658992592661556} 13 | - component: {fileID: 6658992592661557} 14 | - component: {fileID: 6658992592661554} 15 | m_Layer: 5 16 | m_Name: Viewport 17 | m_TagString: Untagged 18 | m_Icon: {fileID: 0} 19 | m_NavMeshLayer: 0 20 | m_StaticEditorFlags: 0 21 | m_IsActive: 1 22 | --- !u!224 &6658992592661555 23 | RectTransform: 24 | m_ObjectHideFlags: 0 25 | m_CorrespondingSourceObject: {fileID: 0} 26 | m_PrefabInstance: {fileID: 0} 27 | m_PrefabAsset: {fileID: 0} 28 | m_GameObject: {fileID: 6658992592661552} 29 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 30 | m_LocalPosition: {x: 0, y: 0, z: 0} 31 | m_LocalScale: {x: 1, y: 1, z: 1} 32 | m_ConstrainProportionsScale: 0 33 | m_Children: 34 | - {fileID: 6658992750498393} 35 | m_Father: {fileID: 6658993078882958} 36 | m_RootOrder: 0 37 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 38 | m_AnchorMin: {x: 0, y: 0} 39 | m_AnchorMax: {x: 1, y: 1} 40 | m_AnchoredPosition: {x: 0, y: 0} 41 | m_SizeDelta: {x: 0, y: 0} 42 | m_Pivot: {x: 0, y: 1} 43 | --- !u!222 &6658992592661556 44 | CanvasRenderer: 45 | m_ObjectHideFlags: 0 46 | m_CorrespondingSourceObject: {fileID: 0} 47 | m_PrefabInstance: {fileID: 0} 48 | m_PrefabAsset: {fileID: 0} 49 | m_GameObject: {fileID: 6658992592661552} 50 | m_CullTransparentMesh: 0 51 | --- !u!114 &6658992592661557 52 | MonoBehaviour: 53 | m_ObjectHideFlags: 0 54 | m_CorrespondingSourceObject: {fileID: 0} 55 | m_PrefabInstance: {fileID: 0} 56 | m_PrefabAsset: {fileID: 0} 57 | m_GameObject: {fileID: 6658992592661552} 58 | m_Enabled: 1 59 | m_EditorHideFlags: 0 60 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 61 | m_Name: 62 | m_EditorClassIdentifier: 63 | m_Material: {fileID: 0} 64 | m_Color: {r: 1, g: 1, b: 1, a: 1} 65 | m_RaycastTarget: 1 66 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 67 | m_Maskable: 1 68 | m_OnCullStateChanged: 69 | m_PersistentCalls: 70 | m_Calls: [] 71 | m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} 72 | m_Type: 1 73 | m_PreserveAspect: 0 74 | m_FillCenter: 1 75 | m_FillMethod: 4 76 | m_FillAmount: 1 77 | m_FillClockwise: 1 78 | m_FillOrigin: 0 79 | m_UseSpriteMesh: 0 80 | m_PixelsPerUnitMultiplier: 1 81 | --- !u!114 &6658992592661554 82 | MonoBehaviour: 83 | m_ObjectHideFlags: 0 84 | m_CorrespondingSourceObject: {fileID: 0} 85 | m_PrefabInstance: {fileID: 0} 86 | m_PrefabAsset: {fileID: 0} 87 | m_GameObject: {fileID: 6658992592661552} 88 | m_Enabled: 1 89 | m_EditorHideFlags: 0 90 | m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3} 91 | m_Name: 92 | m_EditorClassIdentifier: 93 | m_Padding: {x: 0, y: 0, z: 0, w: 0} 94 | m_Softness: {x: 0, y: 0} 95 | --- !u!1 &6658992750498390 96 | GameObject: 97 | m_ObjectHideFlags: 0 98 | m_CorrespondingSourceObject: {fileID: 0} 99 | m_PrefabInstance: {fileID: 0} 100 | m_PrefabAsset: {fileID: 0} 101 | serializedVersion: 6 102 | m_Component: 103 | - component: {fileID: 6658992750498393} 104 | m_Layer: 5 105 | m_Name: Content 106 | m_TagString: Untagged 107 | m_Icon: {fileID: 0} 108 | m_NavMeshLayer: 0 109 | m_StaticEditorFlags: 0 110 | m_IsActive: 1 111 | --- !u!224 &6658992750498393 112 | RectTransform: 113 | m_ObjectHideFlags: 0 114 | m_CorrespondingSourceObject: {fileID: 0} 115 | m_PrefabInstance: {fileID: 0} 116 | m_PrefabAsset: {fileID: 0} 117 | m_GameObject: {fileID: 6658992750498390} 118 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 119 | m_LocalPosition: {x: 0, y: 0, z: 0} 120 | m_LocalScale: {x: 1, y: 1, z: 1} 121 | m_ConstrainProportionsScale: 0 122 | m_Children: [] 123 | m_Father: {fileID: 6658992592661555} 124 | m_RootOrder: 0 125 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 126 | m_AnchorMin: {x: 0, y: 1} 127 | m_AnchorMax: {x: 1, y: 1} 128 | m_AnchoredPosition: {x: 0, y: -0.000034332275} 129 | m_SizeDelta: {x: 0, y: 300} 130 | m_Pivot: {x: 0, y: 1} 131 | --- !u!1 &6658993078882959 132 | GameObject: 133 | m_ObjectHideFlags: 0 134 | m_CorrespondingSourceObject: {fileID: 0} 135 | m_PrefabInstance: {fileID: 0} 136 | m_PrefabAsset: {fileID: 0} 137 | serializedVersion: 6 138 | m_Component: 139 | - component: {fileID: 6658993078882958} 140 | - component: {fileID: 6658993078882961} 141 | - component: {fileID: 6658993078882960} 142 | m_Layer: 5 143 | m_Name: ScrollViewVertical 144 | m_TagString: Untagged 145 | m_Icon: {fileID: 0} 146 | m_NavMeshLayer: 0 147 | m_StaticEditorFlags: 0 148 | m_IsActive: 1 149 | --- !u!224 &6658993078882958 150 | RectTransform: 151 | m_ObjectHideFlags: 0 152 | m_CorrespondingSourceObject: {fileID: 0} 153 | m_PrefabInstance: {fileID: 0} 154 | m_PrefabAsset: {fileID: 0} 155 | m_GameObject: {fileID: 6658993078882959} 156 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 157 | m_LocalPosition: {x: 0, y: 0, z: 0} 158 | m_LocalScale: {x: 1, y: 1, z: 1} 159 | m_ConstrainProportionsScale: 0 160 | m_Children: 161 | - {fileID: 6658992592661555} 162 | m_Father: {fileID: 0} 163 | m_RootOrder: 0 164 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 165 | m_AnchorMin: {x: 0, y: 0} 166 | m_AnchorMax: {x: 1, y: 1} 167 | m_AnchoredPosition: {x: 0, y: -50} 168 | m_SizeDelta: {x: 0, y: -100} 169 | m_Pivot: {x: 0.5, y: 0.5} 170 | --- !u!114 &6658993078882961 171 | MonoBehaviour: 172 | m_ObjectHideFlags: 0 173 | m_CorrespondingSourceObject: {fileID: 0} 174 | m_PrefabInstance: {fileID: 0} 175 | m_PrefabAsset: {fileID: 0} 176 | m_GameObject: {fileID: 6658993078882959} 177 | m_Enabled: 1 178 | m_EditorHideFlags: 0 179 | m_Script: {fileID: 11500000, guid: 1aa08ab6e0800fa44ae55d278d1423e3, type: 3} 180 | m_Name: 181 | m_EditorClassIdentifier: 182 | m_Content: {fileID: 6658992750498393} 183 | m_Horizontal: 0 184 | m_Vertical: 1 185 | m_MovementType: 1 186 | m_Elasticity: 0.1 187 | m_Inertia: 1 188 | m_DecelerationRate: 0.135 189 | m_ScrollSensitivity: 1 190 | m_Viewport: {fileID: 6658992592661555} 191 | m_HorizontalScrollbar: {fileID: 0} 192 | m_VerticalScrollbar: {fileID: 0} 193 | m_HorizontalScrollbarVisibility: 2 194 | m_VerticalScrollbarVisibility: 2 195 | m_HorizontalScrollbarSpacing: -3 196 | m_VerticalScrollbarSpacing: -3 197 | m_OnValueChanged: 198 | m_PersistentCalls: 199 | m_Calls: [] 200 | --- !u!114 &6658993078882960 201 | MonoBehaviour: 202 | m_ObjectHideFlags: 0 203 | m_CorrespondingSourceObject: {fileID: 0} 204 | m_PrefabInstance: {fileID: 0} 205 | m_PrefabAsset: {fileID: 0} 206 | m_GameObject: {fileID: 6658993078882959} 207 | m_Enabled: 1 208 | m_EditorHideFlags: 0 209 | m_Script: {fileID: 11500000, guid: d584a012d92e744e19fbad8784a4a909, type: 3} 210 | m_Name: 211 | m_EditorClassIdentifier: 212 | Prefab: {fileID: 1213794582161676, guid: b3be0441af2d548b68eb12fb02c3c0b4, type: 3} 213 | TopPadding: 10 214 | BottomPadding: 10 215 | LeftPadding: 10 216 | RightPadding: 10 217 | ItemSpacing: 2 218 | LabelsFont: {fileID: 11400000, guid: a8c90286d549d4f11a8ef619f1631209, type: 2} 219 | TopPullLabel: Pull to refresh 220 | TopReleaseLabel: Release to load 221 | BottomPullLabel: Pull to refresh 222 | BottomReleaseLabel: Release to load 223 | LeftPullLabel: Pull to refresh 224 | LeftReleaseLabel: Release to load 225 | RightPullLabel: Pull to refresh 226 | RightReleaseLabel: Release to load 227 | IsPullTop: 0 228 | IsPullBottom: 0 229 | IsPullLeft: 1 230 | IsPullRight: 1 231 | PullValue: 1.5 232 | LabelOffset: 85 233 | TopLabel: {fileID: 0} 234 | BottomLabel: {fileID: 0} 235 | LeftLabel: {fileID: 0} 236 | RightLabel: {fileID: 0} 237 | Type: 0 238 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Prefabs/ScrollViewVertical.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31b62e6d64d53b2478500129c5690993 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 02a8b80cec04de7428155e5c3f339826 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes/Demo1.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.37311947, g: 0.38074005, b: 0.35872722, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 10 60 | m_AtlasSize: 512 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 256 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &166712355 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 166712356} 124 | - component: {fileID: 166712358} 125 | - component: {fileID: 166712357} 126 | m_Layer: 5 127 | m_Name: Text 128 | m_TagString: Untagged 129 | m_Icon: {fileID: 0} 130 | m_NavMeshLayer: 0 131 | m_StaticEditorFlags: 0 132 | m_IsActive: 1 133 | --- !u!224 &166712356 134 | RectTransform: 135 | m_ObjectHideFlags: 0 136 | m_CorrespondingSourceObject: {fileID: 0} 137 | m_PrefabInstance: {fileID: 0} 138 | m_PrefabAsset: {fileID: 0} 139 | m_GameObject: {fileID: 166712355} 140 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 141 | m_LocalPosition: {x: 0, y: 0, z: 0} 142 | m_LocalScale: {x: 1, y: 1, z: 1} 143 | m_Children: [] 144 | m_Father: {fileID: 320828295} 145 | m_RootOrder: 0 146 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 147 | m_AnchorMin: {x: 0, y: 0} 148 | m_AnchorMax: {x: 1, y: 1} 149 | m_AnchoredPosition: {x: 0, y: 0} 150 | m_SizeDelta: {x: 0, y: 0} 151 | m_Pivot: {x: 0.5, y: 0.5} 152 | --- !u!114 &166712357 153 | MonoBehaviour: 154 | m_ObjectHideFlags: 0 155 | m_CorrespondingSourceObject: {fileID: 0} 156 | m_PrefabInstance: {fileID: 0} 157 | m_PrefabAsset: {fileID: 0} 158 | m_GameObject: {fileID: 166712355} 159 | m_Enabled: 1 160 | m_EditorHideFlags: 0 161 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 162 | m_Name: 163 | m_EditorClassIdentifier: 164 | m_Material: {fileID: 0} 165 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 166 | m_RaycastTarget: 1 167 | m_OnCullStateChanged: 168 | m_PersistentCalls: 169 | m_Calls: [] 170 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 171 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 172 | m_FontData: 173 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 174 | m_FontSize: 14 175 | m_FontStyle: 0 176 | m_BestFit: 0 177 | m_MinSize: 10 178 | m_MaxSize: 40 179 | m_Alignment: 4 180 | m_AlignByGeometry: 0 181 | m_RichText: 1 182 | m_HorizontalOverflow: 0 183 | m_VerticalOverflow: 0 184 | m_LineSpacing: 1 185 | m_Text: Next demo 186 | --- !u!222 &166712358 187 | CanvasRenderer: 188 | m_ObjectHideFlags: 0 189 | m_CorrespondingSourceObject: {fileID: 0} 190 | m_PrefabInstance: {fileID: 0} 191 | m_PrefabAsset: {fileID: 0} 192 | m_GameObject: {fileID: 166712355} 193 | m_CullTransparentMesh: 0 194 | --- !u!1 &320828294 195 | GameObject: 196 | m_ObjectHideFlags: 0 197 | m_CorrespondingSourceObject: {fileID: 0} 198 | m_PrefabInstance: {fileID: 0} 199 | m_PrefabAsset: {fileID: 0} 200 | serializedVersion: 6 201 | m_Component: 202 | - component: {fileID: 320828295} 203 | - component: {fileID: 320828298} 204 | - component: {fileID: 320828297} 205 | - component: {fileID: 320828296} 206 | m_Layer: 5 207 | m_Name: LoadButton 208 | m_TagString: Untagged 209 | m_Icon: {fileID: 0} 210 | m_NavMeshLayer: 0 211 | m_StaticEditorFlags: 0 212 | m_IsActive: 1 213 | --- !u!224 &320828295 214 | RectTransform: 215 | m_ObjectHideFlags: 0 216 | m_CorrespondingSourceObject: {fileID: 0} 217 | m_PrefabInstance: {fileID: 0} 218 | m_PrefabAsset: {fileID: 0} 219 | m_GameObject: {fileID: 320828294} 220 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 221 | m_LocalPosition: {x: 0, y: 0, z: 0} 222 | m_LocalScale: {x: 1, y: 1, z: 1} 223 | m_Children: 224 | - {fileID: 166712356} 225 | m_Father: {fileID: 1508541836} 226 | m_RootOrder: 0 227 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 228 | m_AnchorMin: {x: 0, y: 0} 229 | m_AnchorMax: {x: 0, y: 0} 230 | m_AnchoredPosition: {x: 0, y: 0} 231 | m_SizeDelta: {x: 0, y: 50} 232 | m_Pivot: {x: 0.5, y: 0.5} 233 | --- !u!114 &320828296 234 | MonoBehaviour: 235 | m_ObjectHideFlags: 0 236 | m_CorrespondingSourceObject: {fileID: 0} 237 | m_PrefabInstance: {fileID: 0} 238 | m_PrefabAsset: {fileID: 0} 239 | m_GameObject: {fileID: 320828294} 240 | m_Enabled: 1 241 | m_EditorHideFlags: 0 242 | m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} 243 | m_Name: 244 | m_EditorClassIdentifier: 245 | m_Navigation: 246 | m_Mode: 3 247 | m_SelectOnUp: {fileID: 0} 248 | m_SelectOnDown: {fileID: 0} 249 | m_SelectOnLeft: {fileID: 0} 250 | m_SelectOnRight: {fileID: 0} 251 | m_Transition: 1 252 | m_Colors: 253 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 254 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 255 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 256 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 257 | m_ColorMultiplier: 1 258 | m_FadeDuration: 0.1 259 | m_SpriteState: 260 | m_HighlightedSprite: {fileID: 0} 261 | m_PressedSprite: {fileID: 0} 262 | m_DisabledSprite: {fileID: 0} 263 | m_AnimationTriggers: 264 | m_NormalTrigger: Normal 265 | m_HighlightedTrigger: Highlighted 266 | m_PressedTrigger: Pressed 267 | m_DisabledTrigger: Disabled 268 | m_Interactable: 1 269 | m_TargetGraphic: {fileID: 320828297} 270 | m_OnClick: 271 | m_PersistentCalls: 272 | m_Calls: 273 | - m_Target: {fileID: 1174115148} 274 | m_MethodName: SceneLoad 275 | m_Mode: 3 276 | m_Arguments: 277 | m_ObjectArgument: {fileID: 0} 278 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 279 | m_IntArgument: 1 280 | m_FloatArgument: 0 281 | m_StringArgument: 282 | m_BoolArgument: 0 283 | m_CallState: 2 284 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 285 | Culture=neutral, PublicKeyToken=null 286 | --- !u!114 &320828297 287 | MonoBehaviour: 288 | m_ObjectHideFlags: 0 289 | m_CorrespondingSourceObject: {fileID: 0} 290 | m_PrefabInstance: {fileID: 0} 291 | m_PrefabAsset: {fileID: 0} 292 | m_GameObject: {fileID: 320828294} 293 | m_Enabled: 1 294 | m_EditorHideFlags: 0 295 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 296 | m_Name: 297 | m_EditorClassIdentifier: 298 | m_Material: {fileID: 0} 299 | m_Color: {r: 1, g: 1, b: 1, a: 1} 300 | m_RaycastTarget: 1 301 | m_OnCullStateChanged: 302 | m_PersistentCalls: 303 | m_Calls: [] 304 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 305 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 306 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 307 | m_Type: 1 308 | m_PreserveAspect: 0 309 | m_FillCenter: 1 310 | m_FillMethod: 4 311 | m_FillAmount: 1 312 | m_FillClockwise: 1 313 | m_FillOrigin: 0 314 | m_UseSpriteMesh: 0 315 | --- !u!222 &320828298 316 | CanvasRenderer: 317 | m_ObjectHideFlags: 0 318 | m_CorrespondingSourceObject: {fileID: 0} 319 | m_PrefabInstance: {fileID: 0} 320 | m_PrefabAsset: {fileID: 0} 321 | m_GameObject: {fileID: 320828294} 322 | m_CullTransparentMesh: 0 323 | --- !u!1 &322971598 324 | GameObject: 325 | m_ObjectHideFlags: 0 326 | m_CorrespondingSourceObject: {fileID: 0} 327 | m_PrefabInstance: {fileID: 0} 328 | m_PrefabAsset: {fileID: 0} 329 | serializedVersion: 6 330 | m_Component: 331 | - component: {fileID: 322971599} 332 | - component: {fileID: 322971600} 333 | - component: {fileID: 322971601} 334 | m_Layer: 5 335 | m_Name: Scroll View 336 | m_TagString: Untagged 337 | m_Icon: {fileID: 0} 338 | m_NavMeshLayer: 0 339 | m_StaticEditorFlags: 0 340 | m_IsActive: 1 341 | --- !u!224 &322971599 342 | RectTransform: 343 | m_ObjectHideFlags: 0 344 | m_CorrespondingSourceObject: {fileID: 0} 345 | m_PrefabInstance: {fileID: 0} 346 | m_PrefabAsset: {fileID: 0} 347 | m_GameObject: {fileID: 322971598} 348 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 349 | m_LocalPosition: {x: 0, y: 0, z: 0} 350 | m_LocalScale: {x: 1, y: 1, z: 1} 351 | m_Children: 352 | - {fileID: 1045125490} 353 | m_Father: {fileID: 530256083} 354 | m_RootOrder: 2 355 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 356 | m_AnchorMin: {x: 0, y: 0} 357 | m_AnchorMax: {x: 1, y: 1} 358 | m_AnchoredPosition: {x: 0, y: -50} 359 | m_SizeDelta: {x: 0, y: -100} 360 | m_Pivot: {x: 0.5, y: 0.5} 361 | --- !u!114 &322971600 362 | MonoBehaviour: 363 | m_ObjectHideFlags: 0 364 | m_CorrespondingSourceObject: {fileID: 0} 365 | m_PrefabInstance: {fileID: 0} 366 | m_PrefabAsset: {fileID: 0} 367 | m_GameObject: {fileID: 322971598} 368 | m_Enabled: 1 369 | m_EditorHideFlags: 0 370 | m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} 371 | m_Name: 372 | m_EditorClassIdentifier: 373 | m_Content: {fileID: 657712920} 374 | m_Horizontal: 0 375 | m_Vertical: 1 376 | m_MovementType: 1 377 | m_Elasticity: 0.1 378 | m_Inertia: 1 379 | m_DecelerationRate: 0.135 380 | m_ScrollSensitivity: 1 381 | m_Viewport: {fileID: 1045125490} 382 | m_HorizontalScrollbar: {fileID: 0} 383 | m_VerticalScrollbar: {fileID: 0} 384 | m_HorizontalScrollbarVisibility: 2 385 | m_VerticalScrollbarVisibility: 2 386 | m_HorizontalScrollbarSpacing: -3 387 | m_VerticalScrollbarSpacing: -3 388 | m_OnValueChanged: 389 | m_PersistentCalls: 390 | m_Calls: [] 391 | m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, 392 | Culture=neutral, PublicKeyToken=null 393 | --- !u!114 &322971601 394 | MonoBehaviour: 395 | m_ObjectHideFlags: 0 396 | m_CorrespondingSourceObject: {fileID: 0} 397 | m_PrefabInstance: {fileID: 0} 398 | m_PrefabAsset: {fileID: 0} 399 | m_GameObject: {fileID: 322971598} 400 | m_Enabled: 1 401 | m_EditorHideFlags: 0 402 | m_Script: {fileID: 11500000, guid: d584a012d92e744e19fbad8784a4a909, type: 3} 403 | m_Name: 404 | m_EditorClassIdentifier: 405 | Prefab: {fileID: 1213794582161676, guid: b3be0441af2d548b68eb12fb02c3c0b4, type: 3} 406 | TopPadding: 10 407 | BottomPadding: 10 408 | LeftPadding: 10 409 | RightPadding: 10 410 | ItemSpacing: 2 411 | LabelsFont: {fileID: 11400000, guid: a8c90286d549d4f11a8ef619f1631209, type: 2} 412 | TopPullLabel: Pull to refresh 413 | TopReleaseLabel: Release to load 414 | BottomPullLabel: Pull to refresh 415 | BottomReleaseLabel: Release to load 416 | LeftPullLabel: Pull to refresh 417 | LeftReleaseLabel: Release to load 418 | RightPullLabel: Pull to refresh 419 | RightReleaseLabel: Release to load 420 | IsPullTop: 0 421 | IsPullBottom: 0 422 | IsPullLeft: 1 423 | IsPullRight: 1 424 | TopLabel: {fileID: 0} 425 | BottomLabel: {fileID: 0} 426 | LeftLabel: {fileID: 0} 427 | RightLabel: {fileID: 0} 428 | Type: 0 429 | --- !u!1 &530256079 430 | GameObject: 431 | m_ObjectHideFlags: 0 432 | m_CorrespondingSourceObject: {fileID: 0} 433 | m_PrefabInstance: {fileID: 0} 434 | m_PrefabAsset: {fileID: 0} 435 | serializedVersion: 6 436 | m_Component: 437 | - component: {fileID: 530256083} 438 | - component: {fileID: 530256082} 439 | - component: {fileID: 530256081} 440 | - component: {fileID: 530256080} 441 | m_Layer: 5 442 | m_Name: Canvas 443 | m_TagString: Untagged 444 | m_Icon: {fileID: 0} 445 | m_NavMeshLayer: 0 446 | m_StaticEditorFlags: 0 447 | m_IsActive: 1 448 | --- !u!114 &530256080 449 | MonoBehaviour: 450 | m_ObjectHideFlags: 0 451 | m_CorrespondingSourceObject: {fileID: 0} 452 | m_PrefabInstance: {fileID: 0} 453 | m_PrefabAsset: {fileID: 0} 454 | m_GameObject: {fileID: 530256079} 455 | m_Enabled: 1 456 | m_EditorHideFlags: 0 457 | m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} 458 | m_Name: 459 | m_EditorClassIdentifier: 460 | m_IgnoreReversedGraphics: 1 461 | m_BlockingObjects: 0 462 | m_BlockingMask: 463 | serializedVersion: 2 464 | m_Bits: 4294967295 465 | --- !u!114 &530256081 466 | MonoBehaviour: 467 | m_ObjectHideFlags: 0 468 | m_CorrespondingSourceObject: {fileID: 0} 469 | m_PrefabInstance: {fileID: 0} 470 | m_PrefabAsset: {fileID: 0} 471 | m_GameObject: {fileID: 530256079} 472 | m_Enabled: 1 473 | m_EditorHideFlags: 0 474 | m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} 475 | m_Name: 476 | m_EditorClassIdentifier: 477 | m_UiScaleMode: 0 478 | m_ReferencePixelsPerUnit: 100 479 | m_ScaleFactor: 1 480 | m_ReferenceResolution: {x: 800, y: 600} 481 | m_ScreenMatchMode: 0 482 | m_MatchWidthOrHeight: 0 483 | m_PhysicalUnit: 3 484 | m_FallbackScreenDPI: 96 485 | m_DefaultSpriteDPI: 96 486 | m_DynamicPixelsPerUnit: 1 487 | --- !u!223 &530256082 488 | Canvas: 489 | m_ObjectHideFlags: 0 490 | m_CorrespondingSourceObject: {fileID: 0} 491 | m_PrefabInstance: {fileID: 0} 492 | m_PrefabAsset: {fileID: 0} 493 | m_GameObject: {fileID: 530256079} 494 | m_Enabled: 1 495 | serializedVersion: 3 496 | m_RenderMode: 0 497 | m_Camera: {fileID: 0} 498 | m_PlaneDistance: 100 499 | m_PixelPerfect: 0 500 | m_ReceivesEvents: 1 501 | m_OverrideSorting: 0 502 | m_OverridePixelPerfect: 0 503 | m_SortingBucketNormalizedSize: 0 504 | m_AdditionalShaderChannelsFlag: 0 505 | m_SortingLayerID: 0 506 | m_SortingOrder: 0 507 | m_TargetDisplay: 0 508 | --- !u!224 &530256083 509 | RectTransform: 510 | m_ObjectHideFlags: 0 511 | m_CorrespondingSourceObject: {fileID: 0} 512 | m_PrefabInstance: {fileID: 0} 513 | m_PrefabAsset: {fileID: 0} 514 | m_GameObject: {fileID: 530256079} 515 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 516 | m_LocalPosition: {x: 0, y: 0, z: 0} 517 | m_LocalScale: {x: 0, y: 0, z: 0} 518 | m_Children: 519 | - {fileID: 2143121004} 520 | - {fileID: 1508541836} 521 | - {fileID: 322971599} 522 | m_Father: {fileID: 0} 523 | m_RootOrder: 1 524 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 525 | m_AnchorMin: {x: 0, y: 0} 526 | m_AnchorMax: {x: 0, y: 0} 527 | m_AnchoredPosition: {x: 0, y: 0} 528 | m_SizeDelta: {x: 0, y: 0} 529 | m_Pivot: {x: 0, y: 0} 530 | --- !u!1 &534669902 531 | GameObject: 532 | m_ObjectHideFlags: 0 533 | m_CorrespondingSourceObject: {fileID: 0} 534 | m_PrefabInstance: {fileID: 0} 535 | m_PrefabAsset: {fileID: 0} 536 | serializedVersion: 6 537 | m_Component: 538 | - component: {fileID: 534669905} 539 | - component: {fileID: 534669904} 540 | - component: {fileID: 534669903} 541 | m_Layer: 0 542 | m_Name: Main Camera 543 | m_TagString: Untagged 544 | m_Icon: {fileID: 0} 545 | m_NavMeshLayer: 0 546 | m_StaticEditorFlags: 0 547 | m_IsActive: 1 548 | --- !u!81 &534669903 549 | AudioListener: 550 | m_ObjectHideFlags: 0 551 | m_CorrespondingSourceObject: {fileID: 0} 552 | m_PrefabInstance: {fileID: 0} 553 | m_PrefabAsset: {fileID: 0} 554 | m_GameObject: {fileID: 534669902} 555 | m_Enabled: 1 556 | --- !u!20 &534669904 557 | Camera: 558 | m_ObjectHideFlags: 0 559 | m_CorrespondingSourceObject: {fileID: 0} 560 | m_PrefabInstance: {fileID: 0} 561 | m_PrefabAsset: {fileID: 0} 562 | m_GameObject: {fileID: 534669902} 563 | m_Enabled: 1 564 | serializedVersion: 2 565 | m_ClearFlags: 2 566 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 567 | m_projectionMatrixMode: 1 568 | m_SensorSize: {x: 36, y: 24} 569 | m_LensShift: {x: 0, y: 0} 570 | m_GateFitMode: 2 571 | m_FocalLength: 50 572 | m_NormalizedViewPortRect: 573 | serializedVersion: 2 574 | x: 0 575 | y: 0 576 | width: 1 577 | height: 1 578 | near clip plane: 0.3 579 | far clip plane: 1000 580 | field of view: 60 581 | orthographic: 0 582 | orthographic size: 5 583 | m_Depth: -1 584 | m_CullingMask: 585 | serializedVersion: 2 586 | m_Bits: 4294967295 587 | m_RenderingPath: -1 588 | m_TargetTexture: {fileID: 0} 589 | m_TargetDisplay: 0 590 | m_TargetEye: 3 591 | m_HDR: 1 592 | m_AllowMSAA: 1 593 | m_AllowDynamicResolution: 0 594 | m_ForceIntoRT: 0 595 | m_OcclusionCulling: 1 596 | m_StereoConvergence: 10 597 | m_StereoSeparation: 0.022 598 | --- !u!4 &534669905 599 | Transform: 600 | m_ObjectHideFlags: 0 601 | m_CorrespondingSourceObject: {fileID: 0} 602 | m_PrefabInstance: {fileID: 0} 603 | m_PrefabAsset: {fileID: 0} 604 | m_GameObject: {fileID: 534669902} 605 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 606 | m_LocalPosition: {x: 0, y: 1, z: -10} 607 | m_LocalScale: {x: 1, y: 1, z: 1} 608 | m_Children: [] 609 | m_Father: {fileID: 0} 610 | m_RootOrder: 0 611 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 612 | --- !u!1 &657712919 613 | GameObject: 614 | m_ObjectHideFlags: 0 615 | m_CorrespondingSourceObject: {fileID: 0} 616 | m_PrefabInstance: {fileID: 0} 617 | m_PrefabAsset: {fileID: 0} 618 | serializedVersion: 6 619 | m_Component: 620 | - component: {fileID: 657712920} 621 | m_Layer: 5 622 | m_Name: Content 623 | m_TagString: Untagged 624 | m_Icon: {fileID: 0} 625 | m_NavMeshLayer: 0 626 | m_StaticEditorFlags: 0 627 | m_IsActive: 1 628 | --- !u!224 &657712920 629 | RectTransform: 630 | m_ObjectHideFlags: 0 631 | m_CorrespondingSourceObject: {fileID: 0} 632 | m_PrefabInstance: {fileID: 0} 633 | m_PrefabAsset: {fileID: 0} 634 | m_GameObject: {fileID: 657712919} 635 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 636 | m_LocalPosition: {x: 0, y: 0, z: 0} 637 | m_LocalScale: {x: 1, y: 1, z: 1} 638 | m_Children: [] 639 | m_Father: {fileID: 1045125490} 640 | m_RootOrder: 0 641 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 642 | m_AnchorMin: {x: 0, y: 1} 643 | m_AnchorMax: {x: 1, y: 1} 644 | m_AnchoredPosition: {x: 0, y: -0.000034332275} 645 | m_SizeDelta: {x: 0, y: 300} 646 | m_Pivot: {x: 0, y: 1} 647 | --- !u!1 &1045125489 648 | GameObject: 649 | m_ObjectHideFlags: 0 650 | m_CorrespondingSourceObject: {fileID: 0} 651 | m_PrefabInstance: {fileID: 0} 652 | m_PrefabAsset: {fileID: 0} 653 | serializedVersion: 6 654 | m_Component: 655 | - component: {fileID: 1045125490} 656 | - component: {fileID: 1045125493} 657 | - component: {fileID: 1045125492} 658 | - component: {fileID: 1045125491} 659 | m_Layer: 5 660 | m_Name: Viewport 661 | m_TagString: Untagged 662 | m_Icon: {fileID: 0} 663 | m_NavMeshLayer: 0 664 | m_StaticEditorFlags: 0 665 | m_IsActive: 1 666 | --- !u!224 &1045125490 667 | RectTransform: 668 | m_ObjectHideFlags: 0 669 | m_CorrespondingSourceObject: {fileID: 0} 670 | m_PrefabInstance: {fileID: 0} 671 | m_PrefabAsset: {fileID: 0} 672 | m_GameObject: {fileID: 1045125489} 673 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 674 | m_LocalPosition: {x: 0, y: 0, z: 0} 675 | m_LocalScale: {x: 1, y: 1, z: 1} 676 | m_Children: 677 | - {fileID: 657712920} 678 | m_Father: {fileID: 322971599} 679 | m_RootOrder: 0 680 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 681 | m_AnchorMin: {x: 0, y: 0} 682 | m_AnchorMax: {x: 1, y: 1} 683 | m_AnchoredPosition: {x: 0, y: 0} 684 | m_SizeDelta: {x: 0, y: 0} 685 | m_Pivot: {x: 0, y: 1} 686 | --- !u!114 &1045125491 687 | MonoBehaviour: 688 | m_ObjectHideFlags: 0 689 | m_CorrespondingSourceObject: {fileID: 0} 690 | m_PrefabInstance: {fileID: 0} 691 | m_PrefabAsset: {fileID: 0} 692 | m_GameObject: {fileID: 1045125489} 693 | m_Enabled: 1 694 | m_EditorHideFlags: 0 695 | m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3} 696 | m_Name: 697 | m_EditorClassIdentifier: 698 | --- !u!114 &1045125492 699 | MonoBehaviour: 700 | m_ObjectHideFlags: 0 701 | m_CorrespondingSourceObject: {fileID: 0} 702 | m_PrefabInstance: {fileID: 0} 703 | m_PrefabAsset: {fileID: 0} 704 | m_GameObject: {fileID: 1045125489} 705 | m_Enabled: 1 706 | m_EditorHideFlags: 0 707 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 708 | m_Name: 709 | m_EditorClassIdentifier: 710 | m_Material: {fileID: 0} 711 | m_Color: {r: 1, g: 1, b: 1, a: 1} 712 | m_RaycastTarget: 1 713 | m_OnCullStateChanged: 714 | m_PersistentCalls: 715 | m_Calls: [] 716 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 717 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 718 | m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} 719 | m_Type: 1 720 | m_PreserveAspect: 0 721 | m_FillCenter: 1 722 | m_FillMethod: 4 723 | m_FillAmount: 1 724 | m_FillClockwise: 1 725 | m_FillOrigin: 0 726 | m_UseSpriteMesh: 0 727 | --- !u!222 &1045125493 728 | CanvasRenderer: 729 | m_ObjectHideFlags: 0 730 | m_CorrespondingSourceObject: {fileID: 0} 731 | m_PrefabInstance: {fileID: 0} 732 | m_PrefabAsset: {fileID: 0} 733 | m_GameObject: {fileID: 1045125489} 734 | m_CullTransparentMesh: 0 735 | --- !u!1 &1174115147 736 | GameObject: 737 | m_ObjectHideFlags: 0 738 | m_CorrespondingSourceObject: {fileID: 0} 739 | m_PrefabInstance: {fileID: 0} 740 | m_PrefabAsset: {fileID: 0} 741 | serializedVersion: 6 742 | m_Component: 743 | - component: {fileID: 1174115149} 744 | - component: {fileID: 1174115148} 745 | m_Layer: 0 746 | m_Name: Scripts 747 | m_TagString: Untagged 748 | m_Icon: {fileID: 0} 749 | m_NavMeshLayer: 0 750 | m_StaticEditorFlags: 0 751 | m_IsActive: 1 752 | --- !u!114 &1174115148 753 | MonoBehaviour: 754 | m_ObjectHideFlags: 0 755 | m_CorrespondingSourceObject: {fileID: 0} 756 | m_PrefabInstance: {fileID: 0} 757 | m_PrefabAsset: {fileID: 0} 758 | m_GameObject: {fileID: 1174115147} 759 | m_Enabled: 1 760 | m_EditorHideFlags: 0 761 | m_Script: {fileID: 11500000, guid: 4e1e3920ed4644e69826aeb6501ec933, type: 3} 762 | m_Name: 763 | m_EditorClassIdentifier: 764 | Scroll: {fileID: 322971601} 765 | Count: 100 766 | --- !u!4 &1174115149 767 | Transform: 768 | m_ObjectHideFlags: 0 769 | m_CorrespondingSourceObject: {fileID: 0} 770 | m_PrefabInstance: {fileID: 0} 771 | m_PrefabAsset: {fileID: 0} 772 | m_GameObject: {fileID: 1174115147} 773 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 774 | m_LocalPosition: {x: 0, y: 0, z: 0} 775 | m_LocalScale: {x: 1, y: 1, z: 1} 776 | m_Children: [] 777 | m_Father: {fileID: 0} 778 | m_RootOrder: 3 779 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 780 | --- !u!1 &1508541835 781 | GameObject: 782 | m_ObjectHideFlags: 0 783 | m_CorrespondingSourceObject: {fileID: 0} 784 | m_PrefabInstance: {fileID: 0} 785 | m_PrefabAsset: {fileID: 0} 786 | serializedVersion: 6 787 | m_Component: 788 | - component: {fileID: 1508541836} 789 | - component: {fileID: 1508541837} 790 | m_Layer: 5 791 | m_Name: Header 792 | m_TagString: Untagged 793 | m_Icon: {fileID: 0} 794 | m_NavMeshLayer: 0 795 | m_StaticEditorFlags: 0 796 | m_IsActive: 1 797 | --- !u!224 &1508541836 798 | RectTransform: 799 | m_ObjectHideFlags: 0 800 | m_CorrespondingSourceObject: {fileID: 0} 801 | m_PrefabInstance: {fileID: 0} 802 | m_PrefabAsset: {fileID: 0} 803 | m_GameObject: {fileID: 1508541835} 804 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 805 | m_LocalPosition: {x: 0, y: 0, z: 0} 806 | m_LocalScale: {x: 1, y: 1, z: 1} 807 | m_Children: 808 | - {fileID: 320828295} 809 | m_Father: {fileID: 530256083} 810 | m_RootOrder: 1 811 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 812 | m_AnchorMin: {x: 0, y: 1} 813 | m_AnchorMax: {x: 1, y: 1} 814 | m_AnchoredPosition: {x: 0, y: -50} 815 | m_SizeDelta: {x: 0, y: 50} 816 | m_Pivot: {x: 0.5, y: 1} 817 | --- !u!114 &1508541837 818 | MonoBehaviour: 819 | m_ObjectHideFlags: 0 820 | m_CorrespondingSourceObject: {fileID: 0} 821 | m_PrefabInstance: {fileID: 0} 822 | m_PrefabAsset: {fileID: 0} 823 | m_GameObject: {fileID: 1508541835} 824 | m_Enabled: 1 825 | m_EditorHideFlags: 0 826 | m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} 827 | m_Name: 828 | m_EditorClassIdentifier: 829 | m_Padding: 830 | m_Left: 0 831 | m_Right: 0 832 | m_Top: 0 833 | m_Bottom: 0 834 | m_ChildAlignment: 0 835 | m_Spacing: 0 836 | m_ChildForceExpandWidth: 1 837 | m_ChildForceExpandHeight: 1 838 | m_ChildControlWidth: 1 839 | m_ChildControlHeight: 0 840 | --- !u!1 &1973094329 841 | GameObject: 842 | m_ObjectHideFlags: 0 843 | m_CorrespondingSourceObject: {fileID: 0} 844 | m_PrefabInstance: {fileID: 0} 845 | m_PrefabAsset: {fileID: 0} 846 | serializedVersion: 6 847 | m_Component: 848 | - component: {fileID: 1973094332} 849 | - component: {fileID: 1973094331} 850 | - component: {fileID: 1973094330} 851 | m_Layer: 0 852 | m_Name: EventSystem 853 | m_TagString: Untagged 854 | m_Icon: {fileID: 0} 855 | m_NavMeshLayer: 0 856 | m_StaticEditorFlags: 0 857 | m_IsActive: 1 858 | --- !u!114 &1973094330 859 | MonoBehaviour: 860 | m_ObjectHideFlags: 0 861 | m_CorrespondingSourceObject: {fileID: 0} 862 | m_PrefabInstance: {fileID: 0} 863 | m_PrefabAsset: {fileID: 0} 864 | m_GameObject: {fileID: 1973094329} 865 | m_Enabled: 1 866 | m_EditorHideFlags: 0 867 | m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} 868 | m_Name: 869 | m_EditorClassIdentifier: 870 | m_HorizontalAxis: Horizontal 871 | m_VerticalAxis: Vertical 872 | m_SubmitButton: Submit 873 | m_CancelButton: Cancel 874 | m_InputActionsPerSecond: 10 875 | m_RepeatDelay: 0.5 876 | m_ForceModuleActive: 0 877 | --- !u!114 &1973094331 878 | MonoBehaviour: 879 | m_ObjectHideFlags: 0 880 | m_CorrespondingSourceObject: {fileID: 0} 881 | m_PrefabInstance: {fileID: 0} 882 | m_PrefabAsset: {fileID: 0} 883 | m_GameObject: {fileID: 1973094329} 884 | m_Enabled: 1 885 | m_EditorHideFlags: 0 886 | m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} 887 | m_Name: 888 | m_EditorClassIdentifier: 889 | m_FirstSelected: {fileID: 0} 890 | m_sendNavigationEvents: 1 891 | m_DragThreshold: 10 892 | --- !u!4 &1973094332 893 | Transform: 894 | m_ObjectHideFlags: 0 895 | m_CorrespondingSourceObject: {fileID: 0} 896 | m_PrefabInstance: {fileID: 0} 897 | m_PrefabAsset: {fileID: 0} 898 | m_GameObject: {fileID: 1973094329} 899 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 900 | m_LocalPosition: {x: 0, y: 0, z: 0} 901 | m_LocalScale: {x: 1, y: 1, z: 1} 902 | m_Children: [] 903 | m_Father: {fileID: 0} 904 | m_RootOrder: 2 905 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 906 | --- !u!1 &2143121003 907 | GameObject: 908 | m_ObjectHideFlags: 0 909 | m_CorrespondingSourceObject: {fileID: 0} 910 | m_PrefabInstance: {fileID: 0} 911 | m_PrefabAsset: {fileID: 0} 912 | serializedVersion: 6 913 | m_Component: 914 | - component: {fileID: 2143121004} 915 | - component: {fileID: 2143121006} 916 | - component: {fileID: 2143121005} 917 | m_Layer: 5 918 | m_Name: Text 919 | m_TagString: Untagged 920 | m_Icon: {fileID: 0} 921 | m_NavMeshLayer: 0 922 | m_StaticEditorFlags: 0 923 | m_IsActive: 1 924 | --- !u!224 &2143121004 925 | RectTransform: 926 | m_ObjectHideFlags: 0 927 | m_CorrespondingSourceObject: {fileID: 0} 928 | m_PrefabInstance: {fileID: 0} 929 | m_PrefabAsset: {fileID: 0} 930 | m_GameObject: {fileID: 2143121003} 931 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 932 | m_LocalPosition: {x: 0, y: 0, z: 0} 933 | m_LocalScale: {x: 1, y: 1, z: 1} 934 | m_Children: [] 935 | m_Father: {fileID: 530256083} 936 | m_RootOrder: 0 937 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 938 | m_AnchorMin: {x: 0, y: 1} 939 | m_AnchorMax: {x: 1, y: 1} 940 | m_AnchoredPosition: {x: 0, y: 0} 941 | m_SizeDelta: {x: 0, y: 50} 942 | m_Pivot: {x: 0.5, y: 1} 943 | --- !u!114 &2143121005 944 | MonoBehaviour: 945 | m_ObjectHideFlags: 0 946 | m_CorrespondingSourceObject: {fileID: 0} 947 | m_PrefabInstance: {fileID: 0} 948 | m_PrefabAsset: {fileID: 0} 949 | m_GameObject: {fileID: 2143121003} 950 | m_Enabled: 1 951 | m_EditorHideFlags: 0 952 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 953 | m_Name: 954 | m_EditorClassIdentifier: 955 | m_Material: {fileID: 0} 956 | m_Color: {r: 1, g: 1, b: 1, a: 1} 957 | m_RaycastTarget: 1 958 | m_OnCullStateChanged: 959 | m_PersistentCalls: 960 | m_Calls: [] 961 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 962 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 963 | m_FontData: 964 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 965 | m_FontSize: 14 966 | m_FontStyle: 0 967 | m_BestFit: 0 968 | m_MinSize: 10 969 | m_MaxSize: 40 970 | m_Alignment: 4 971 | m_AlignByGeometry: 0 972 | m_RichText: 1 973 | m_HorizontalOverflow: 0 974 | m_VerticalOverflow: 0 975 | m_LineSpacing: 1 976 | m_Text: 'Demo1. Simple scroll with one item height. 977 | 978 | mopsicus.ru' 979 | --- !u!222 &2143121006 980 | CanvasRenderer: 981 | m_ObjectHideFlags: 0 982 | m_CorrespondingSourceObject: {fileID: 0} 983 | m_PrefabInstance: {fileID: 0} 984 | m_PrefabAsset: {fileID: 0} 985 | m_GameObject: {fileID: 2143121003} 986 | m_CullTransparentMesh: 0 987 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes/Demo1.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99c9720ab356a0642a771bea13969a05 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes/Demo2.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 48da4499451f44851ad18827470b951c 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes/Demo3.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc1ed8972a0a04191bef5c8209bff04a 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes/Demo4.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aecb6da55fcd14865888e4d2088e8996 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes/Demo5.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | OcclusionCullingSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_OcclusionBakeSettings: 8 | smallestOccluder: 5 9 | smallestHole: 0.25 10 | backfaceThreshold: 100 11 | m_SceneGUID: 00000000000000000000000000000000 12 | m_OcclusionCullingData: {fileID: 0} 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 9 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 0 28 | m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} 29 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 30 | m_HaloStrength: 0.5 31 | m_FlareStrength: 1 32 | m_FlareFadeSpeed: 3 33 | m_HaloTexture: {fileID: 0} 34 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 35 | m_DefaultReflectionMode: 0 36 | m_DefaultReflectionResolution: 128 37 | m_ReflectionBounces: 1 38 | m_ReflectionIntensity: 1 39 | m_CustomReflection: {fileID: 0} 40 | m_Sun: {fileID: 0} 41 | m_IndirectSpecularColor: {r: 0.37311947, g: 0.38074005, b: 0.35872722, a: 1} 42 | m_UseRadianceAmbientProbe: 0 43 | --- !u!157 &3 44 | LightmapSettings: 45 | m_ObjectHideFlags: 0 46 | serializedVersion: 11 47 | m_GIWorkflowMode: 0 48 | m_GISettings: 49 | serializedVersion: 2 50 | m_BounceScale: 1 51 | m_IndirectOutputScale: 1 52 | m_AlbedoBoost: 1 53 | m_EnvironmentLightingMode: 0 54 | m_EnableBakedLightmaps: 1 55 | m_EnableRealtimeLightmaps: 0 56 | m_LightmapEditorSettings: 57 | serializedVersion: 10 58 | m_Resolution: 2 59 | m_BakeResolution: 10 60 | m_AtlasSize: 512 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_FinalGather: 0 70 | m_FinalGatherFiltering: 1 71 | m_FinalGatherRayCount: 256 72 | m_ReflectionCompression: 2 73 | m_MixedBakeMode: 2 74 | m_BakeBackend: 1 75 | m_PVRSampling: 1 76 | m_PVRDirectSampleCount: 32 77 | m_PVRSampleCount: 256 78 | m_PVRBounces: 2 79 | m_PVRFilterTypeDirect: 0 80 | m_PVRFilterTypeIndirect: 0 81 | m_PVRFilterTypeAO: 0 82 | m_PVRFilteringMode: 1 83 | m_PVRCulling: 1 84 | m_PVRFilteringGaussRadiusDirect: 1 85 | m_PVRFilteringGaussRadiusIndirect: 5 86 | m_PVRFilteringGaussRadiusAO: 2 87 | m_PVRFilteringAtrousPositionSigmaDirect: 0.5 88 | m_PVRFilteringAtrousPositionSigmaIndirect: 2 89 | m_PVRFilteringAtrousPositionSigmaAO: 1 90 | m_ShowResolutionOverlay: 1 91 | m_LightingDataAsset: {fileID: 0} 92 | m_UseShadowmask: 1 93 | --- !u!196 &4 94 | NavMeshSettings: 95 | serializedVersion: 2 96 | m_ObjectHideFlags: 0 97 | m_BuildSettings: 98 | serializedVersion: 2 99 | agentTypeID: 0 100 | agentRadius: 0.5 101 | agentHeight: 2 102 | agentSlope: 45 103 | agentClimb: 0.4 104 | ledgeDropHeight: 0 105 | maxJumpAcrossDistance: 0 106 | minRegionArea: 2 107 | manualCellSize: 0 108 | cellSize: 0.16666667 109 | manualTileSize: 0 110 | tileSize: 256 111 | accuratePlacement: 0 112 | debug: 113 | m_Flags: 0 114 | m_NavMeshData: {fileID: 0} 115 | --- !u!1 &322971598 116 | GameObject: 117 | m_ObjectHideFlags: 0 118 | m_CorrespondingSourceObject: {fileID: 0} 119 | m_PrefabInstance: {fileID: 0} 120 | m_PrefabAsset: {fileID: 0} 121 | serializedVersion: 6 122 | m_Component: 123 | - component: {fileID: 322971599} 124 | - component: {fileID: 322971600} 125 | - component: {fileID: 322971601} 126 | m_Layer: 5 127 | m_Name: Scroll View 128 | m_TagString: Untagged 129 | m_Icon: {fileID: 0} 130 | m_NavMeshLayer: 0 131 | m_StaticEditorFlags: 0 132 | m_IsActive: 1 133 | --- !u!224 &322971599 134 | RectTransform: 135 | m_ObjectHideFlags: 0 136 | m_CorrespondingSourceObject: {fileID: 0} 137 | m_PrefabInstance: {fileID: 0} 138 | m_PrefabAsset: {fileID: 0} 139 | m_GameObject: {fileID: 322971598} 140 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 141 | m_LocalPosition: {x: 0, y: 0, z: 0} 142 | m_LocalScale: {x: 1, y: 1, z: 1} 143 | m_Children: 144 | - {fileID: 1045125490} 145 | m_Father: {fileID: 530256083} 146 | m_RootOrder: 2 147 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 148 | m_AnchorMin: {x: 0, y: 0} 149 | m_AnchorMax: {x: 1, y: 1} 150 | m_AnchoredPosition: {x: 0, y: -50} 151 | m_SizeDelta: {x: 0, y: -100} 152 | m_Pivot: {x: 0.5, y: 0.5} 153 | --- !u!114 &322971600 154 | MonoBehaviour: 155 | m_ObjectHideFlags: 0 156 | m_CorrespondingSourceObject: {fileID: 0} 157 | m_PrefabInstance: {fileID: 0} 158 | m_PrefabAsset: {fileID: 0} 159 | m_GameObject: {fileID: 322971598} 160 | m_Enabled: 1 161 | m_EditorHideFlags: 0 162 | m_Script: {fileID: 1367256648, guid: f70555f144d8491a825f0804e09c671c, type: 3} 163 | m_Name: 164 | m_EditorClassIdentifier: 165 | m_Content: {fileID: 657712920} 166 | m_Horizontal: 1 167 | m_Vertical: 0 168 | m_MovementType: 1 169 | m_Elasticity: 0.1 170 | m_Inertia: 1 171 | m_DecelerationRate: 0.135 172 | m_ScrollSensitivity: 1 173 | m_Viewport: {fileID: 1045125490} 174 | m_HorizontalScrollbar: {fileID: 0} 175 | m_VerticalScrollbar: {fileID: 0} 176 | m_HorizontalScrollbarVisibility: 2 177 | m_VerticalScrollbarVisibility: 2 178 | m_HorizontalScrollbarSpacing: -3 179 | m_VerticalScrollbarSpacing: -3 180 | m_OnValueChanged: 181 | m_PersistentCalls: 182 | m_Calls: [] 183 | m_TypeName: UnityEngine.UI.ScrollRect+ScrollRectEvent, UnityEngine.UI, Version=1.0.0.0, 184 | Culture=neutral, PublicKeyToken=null 185 | --- !u!114 &322971601 186 | MonoBehaviour: 187 | m_ObjectHideFlags: 0 188 | m_CorrespondingSourceObject: {fileID: 0} 189 | m_PrefabInstance: {fileID: 0} 190 | m_PrefabAsset: {fileID: 0} 191 | m_GameObject: {fileID: 322971598} 192 | m_Enabled: 1 193 | m_EditorHideFlags: 0 194 | m_Script: {fileID: 11500000, guid: d584a012d92e744e19fbad8784a4a909, type: 3} 195 | m_Name: 196 | m_EditorClassIdentifier: 197 | Prefab: {fileID: 1213794582161676, guid: b3be0441af2d548b68eb12fb02c3c0b4, type: 3} 198 | TopPadding: 10 199 | BottomPadding: 10 200 | LeftPadding: 10 201 | RightPadding: 10 202 | ItemSpacing: 2 203 | LabelsFont: {fileID: 11400000, guid: a8c90286d549d4f11a8ef619f1631209, type: 2} 204 | TopPullLabel: Pull to refresh 205 | TopReleaseLabel: Release to load 206 | BottomPullLabel: Pull to refresh 207 | BottomReleaseLabel: Release to load 208 | LeftPullLabel: Pull to refresh 209 | LeftReleaseLabel: Release to load 210 | RightPullLabel: Pull to refresh 211 | RightReleaseLabel: Release to load 212 | IsPullTop: 1 213 | IsPullBottom: 1 214 | IsPullLeft: 1 215 | IsPullRight: 1 216 | TopLabel: {fileID: 0} 217 | BottomLabel: {fileID: 0} 218 | LeftLabel: {fileID: 0} 219 | RightLabel: {fileID: 0} 220 | Type: 1 221 | --- !u!1 &530256079 222 | GameObject: 223 | m_ObjectHideFlags: 0 224 | m_CorrespondingSourceObject: {fileID: 0} 225 | m_PrefabInstance: {fileID: 0} 226 | m_PrefabAsset: {fileID: 0} 227 | serializedVersion: 6 228 | m_Component: 229 | - component: {fileID: 530256083} 230 | - component: {fileID: 530256082} 231 | - component: {fileID: 530256081} 232 | - component: {fileID: 530256080} 233 | m_Layer: 5 234 | m_Name: Canvas 235 | m_TagString: Untagged 236 | m_Icon: {fileID: 0} 237 | m_NavMeshLayer: 0 238 | m_StaticEditorFlags: 0 239 | m_IsActive: 1 240 | --- !u!114 &530256080 241 | MonoBehaviour: 242 | m_ObjectHideFlags: 0 243 | m_CorrespondingSourceObject: {fileID: 0} 244 | m_PrefabInstance: {fileID: 0} 245 | m_PrefabAsset: {fileID: 0} 246 | m_GameObject: {fileID: 530256079} 247 | m_Enabled: 1 248 | m_EditorHideFlags: 0 249 | m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3} 250 | m_Name: 251 | m_EditorClassIdentifier: 252 | m_IgnoreReversedGraphics: 1 253 | m_BlockingObjects: 0 254 | m_BlockingMask: 255 | serializedVersion: 2 256 | m_Bits: 4294967295 257 | --- !u!114 &530256081 258 | MonoBehaviour: 259 | m_ObjectHideFlags: 0 260 | m_CorrespondingSourceObject: {fileID: 0} 261 | m_PrefabInstance: {fileID: 0} 262 | m_PrefabAsset: {fileID: 0} 263 | m_GameObject: {fileID: 530256079} 264 | m_Enabled: 1 265 | m_EditorHideFlags: 0 266 | m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} 267 | m_Name: 268 | m_EditorClassIdentifier: 269 | m_UiScaleMode: 0 270 | m_ReferencePixelsPerUnit: 100 271 | m_ScaleFactor: 1 272 | m_ReferenceResolution: {x: 800, y: 600} 273 | m_ScreenMatchMode: 0 274 | m_MatchWidthOrHeight: 0 275 | m_PhysicalUnit: 3 276 | m_FallbackScreenDPI: 96 277 | m_DefaultSpriteDPI: 96 278 | m_DynamicPixelsPerUnit: 1 279 | --- !u!223 &530256082 280 | Canvas: 281 | m_ObjectHideFlags: 0 282 | m_CorrespondingSourceObject: {fileID: 0} 283 | m_PrefabInstance: {fileID: 0} 284 | m_PrefabAsset: {fileID: 0} 285 | m_GameObject: {fileID: 530256079} 286 | m_Enabled: 1 287 | serializedVersion: 3 288 | m_RenderMode: 0 289 | m_Camera: {fileID: 0} 290 | m_PlaneDistance: 100 291 | m_PixelPerfect: 0 292 | m_ReceivesEvents: 1 293 | m_OverrideSorting: 0 294 | m_OverridePixelPerfect: 0 295 | m_SortingBucketNormalizedSize: 0 296 | m_AdditionalShaderChannelsFlag: 0 297 | m_SortingLayerID: 0 298 | m_SortingOrder: 0 299 | m_TargetDisplay: 0 300 | --- !u!224 &530256083 301 | RectTransform: 302 | m_ObjectHideFlags: 0 303 | m_CorrespondingSourceObject: {fileID: 0} 304 | m_PrefabInstance: {fileID: 0} 305 | m_PrefabAsset: {fileID: 0} 306 | m_GameObject: {fileID: 530256079} 307 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 308 | m_LocalPosition: {x: 0, y: 0, z: 0} 309 | m_LocalScale: {x: 0, y: 0, z: 0} 310 | m_Children: 311 | - {fileID: 1171909196} 312 | - {fileID: 1858008202} 313 | - {fileID: 322971599} 314 | m_Father: {fileID: 0} 315 | m_RootOrder: 1 316 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 317 | m_AnchorMin: {x: 0, y: 0} 318 | m_AnchorMax: {x: 0, y: 0} 319 | m_AnchoredPosition: {x: 0, y: 0} 320 | m_SizeDelta: {x: 0, y: 0} 321 | m_Pivot: {x: 0, y: 0} 322 | --- !u!1 &534669902 323 | GameObject: 324 | m_ObjectHideFlags: 0 325 | m_CorrespondingSourceObject: {fileID: 0} 326 | m_PrefabInstance: {fileID: 0} 327 | m_PrefabAsset: {fileID: 0} 328 | serializedVersion: 6 329 | m_Component: 330 | - component: {fileID: 534669905} 331 | - component: {fileID: 534669904} 332 | - component: {fileID: 534669903} 333 | m_Layer: 0 334 | m_Name: Main Camera 335 | m_TagString: Untagged 336 | m_Icon: {fileID: 0} 337 | m_NavMeshLayer: 0 338 | m_StaticEditorFlags: 0 339 | m_IsActive: 1 340 | --- !u!81 &534669903 341 | AudioListener: 342 | m_ObjectHideFlags: 0 343 | m_CorrespondingSourceObject: {fileID: 0} 344 | m_PrefabInstance: {fileID: 0} 345 | m_PrefabAsset: {fileID: 0} 346 | m_GameObject: {fileID: 534669902} 347 | m_Enabled: 1 348 | --- !u!20 &534669904 349 | Camera: 350 | m_ObjectHideFlags: 0 351 | m_CorrespondingSourceObject: {fileID: 0} 352 | m_PrefabInstance: {fileID: 0} 353 | m_PrefabAsset: {fileID: 0} 354 | m_GameObject: {fileID: 534669902} 355 | m_Enabled: 1 356 | serializedVersion: 2 357 | m_ClearFlags: 2 358 | m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0} 359 | m_projectionMatrixMode: 1 360 | m_SensorSize: {x: 36, y: 24} 361 | m_LensShift: {x: 0, y: 0} 362 | m_GateFitMode: 2 363 | m_FocalLength: 50 364 | m_NormalizedViewPortRect: 365 | serializedVersion: 2 366 | x: 0 367 | y: 0 368 | width: 1 369 | height: 1 370 | near clip plane: 0.3 371 | far clip plane: 1000 372 | field of view: 60 373 | orthographic: 0 374 | orthographic size: 5 375 | m_Depth: -1 376 | m_CullingMask: 377 | serializedVersion: 2 378 | m_Bits: 4294967295 379 | m_RenderingPath: -1 380 | m_TargetTexture: {fileID: 0} 381 | m_TargetDisplay: 0 382 | m_TargetEye: 3 383 | m_HDR: 1 384 | m_AllowMSAA: 1 385 | m_AllowDynamicResolution: 0 386 | m_ForceIntoRT: 0 387 | m_OcclusionCulling: 1 388 | m_StereoConvergence: 10 389 | m_StereoSeparation: 0.022 390 | --- !u!4 &534669905 391 | Transform: 392 | m_ObjectHideFlags: 0 393 | m_CorrespondingSourceObject: {fileID: 0} 394 | m_PrefabInstance: {fileID: 0} 395 | m_PrefabAsset: {fileID: 0} 396 | m_GameObject: {fileID: 534669902} 397 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 398 | m_LocalPosition: {x: 0, y: 1, z: -10} 399 | m_LocalScale: {x: 1, y: 1, z: 1} 400 | m_Children: [] 401 | m_Father: {fileID: 0} 402 | m_RootOrder: 0 403 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 404 | --- !u!1 &657712919 405 | GameObject: 406 | m_ObjectHideFlags: 0 407 | m_CorrespondingSourceObject: {fileID: 0} 408 | m_PrefabInstance: {fileID: 0} 409 | m_PrefabAsset: {fileID: 0} 410 | serializedVersion: 6 411 | m_Component: 412 | - component: {fileID: 657712920} 413 | m_Layer: 5 414 | m_Name: Content 415 | m_TagString: Untagged 416 | m_Icon: {fileID: 0} 417 | m_NavMeshLayer: 0 418 | m_StaticEditorFlags: 0 419 | m_IsActive: 1 420 | --- !u!224 &657712920 421 | RectTransform: 422 | m_ObjectHideFlags: 0 423 | m_CorrespondingSourceObject: {fileID: 0} 424 | m_PrefabInstance: {fileID: 0} 425 | m_PrefabAsset: {fileID: 0} 426 | m_GameObject: {fileID: 657712919} 427 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 428 | m_LocalPosition: {x: 0, y: 0, z: 0} 429 | m_LocalScale: {x: 1, y: 1, z: 1} 430 | m_Children: [] 431 | m_Father: {fileID: 1045125490} 432 | m_RootOrder: 0 433 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 434 | m_AnchorMin: {x: 0, y: 0} 435 | m_AnchorMax: {x: 0, y: 1} 436 | m_AnchoredPosition: {x: 0, y: 0} 437 | m_SizeDelta: {x: 300, y: 0} 438 | m_Pivot: {x: 0, y: 0.5} 439 | --- !u!1 &1045125489 440 | GameObject: 441 | m_ObjectHideFlags: 0 442 | m_CorrespondingSourceObject: {fileID: 0} 443 | m_PrefabInstance: {fileID: 0} 444 | m_PrefabAsset: {fileID: 0} 445 | serializedVersion: 6 446 | m_Component: 447 | - component: {fileID: 1045125490} 448 | - component: {fileID: 1045125493} 449 | - component: {fileID: 1045125492} 450 | - component: {fileID: 1045125491} 451 | m_Layer: 5 452 | m_Name: Viewport 453 | m_TagString: Untagged 454 | m_Icon: {fileID: 0} 455 | m_NavMeshLayer: 0 456 | m_StaticEditorFlags: 0 457 | m_IsActive: 1 458 | --- !u!224 &1045125490 459 | RectTransform: 460 | m_ObjectHideFlags: 0 461 | m_CorrespondingSourceObject: {fileID: 0} 462 | m_PrefabInstance: {fileID: 0} 463 | m_PrefabAsset: {fileID: 0} 464 | m_GameObject: {fileID: 1045125489} 465 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 466 | m_LocalPosition: {x: 0, y: 0, z: 0} 467 | m_LocalScale: {x: 1, y: 1, z: 1} 468 | m_Children: 469 | - {fileID: 657712920} 470 | m_Father: {fileID: 322971599} 471 | m_RootOrder: 0 472 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 473 | m_AnchorMin: {x: 0, y: 0} 474 | m_AnchorMax: {x: 1, y: 1} 475 | m_AnchoredPosition: {x: 0, y: 0} 476 | m_SizeDelta: {x: 0, y: 0} 477 | m_Pivot: {x: 0, y: 1} 478 | --- !u!114 &1045125491 479 | MonoBehaviour: 480 | m_ObjectHideFlags: 0 481 | m_CorrespondingSourceObject: {fileID: 0} 482 | m_PrefabInstance: {fileID: 0} 483 | m_PrefabAsset: {fileID: 0} 484 | m_GameObject: {fileID: 1045125489} 485 | m_Enabled: 1 486 | m_EditorHideFlags: 0 487 | m_Script: {fileID: -146154839, guid: f70555f144d8491a825f0804e09c671c, type: 3} 488 | m_Name: 489 | m_EditorClassIdentifier: 490 | --- !u!114 &1045125492 491 | MonoBehaviour: 492 | m_ObjectHideFlags: 0 493 | m_CorrespondingSourceObject: {fileID: 0} 494 | m_PrefabInstance: {fileID: 0} 495 | m_PrefabAsset: {fileID: 0} 496 | m_GameObject: {fileID: 1045125489} 497 | m_Enabled: 1 498 | m_EditorHideFlags: 0 499 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 500 | m_Name: 501 | m_EditorClassIdentifier: 502 | m_Material: {fileID: 0} 503 | m_Color: {r: 1, g: 1, b: 1, a: 1} 504 | m_RaycastTarget: 1 505 | m_OnCullStateChanged: 506 | m_PersistentCalls: 507 | m_Calls: [] 508 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 509 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 510 | m_Sprite: {fileID: 10917, guid: 0000000000000000f000000000000000, type: 0} 511 | m_Type: 1 512 | m_PreserveAspect: 0 513 | m_FillCenter: 1 514 | m_FillMethod: 4 515 | m_FillAmount: 1 516 | m_FillClockwise: 1 517 | m_FillOrigin: 0 518 | m_UseSpriteMesh: 0 519 | --- !u!222 &1045125493 520 | CanvasRenderer: 521 | m_ObjectHideFlags: 0 522 | m_CorrespondingSourceObject: {fileID: 0} 523 | m_PrefabInstance: {fileID: 0} 524 | m_PrefabAsset: {fileID: 0} 525 | m_GameObject: {fileID: 1045125489} 526 | m_CullTransparentMesh: 0 527 | --- !u!1 &1171909195 528 | GameObject: 529 | m_ObjectHideFlags: 0 530 | m_CorrespondingSourceObject: {fileID: 0} 531 | m_PrefabInstance: {fileID: 0} 532 | m_PrefabAsset: {fileID: 0} 533 | serializedVersion: 6 534 | m_Component: 535 | - component: {fileID: 1171909196} 536 | - component: {fileID: 1171909198} 537 | - component: {fileID: 1171909197} 538 | m_Layer: 5 539 | m_Name: Text 540 | m_TagString: Untagged 541 | m_Icon: {fileID: 0} 542 | m_NavMeshLayer: 0 543 | m_StaticEditorFlags: 0 544 | m_IsActive: 1 545 | --- !u!224 &1171909196 546 | RectTransform: 547 | m_ObjectHideFlags: 0 548 | m_CorrespondingSourceObject: {fileID: 0} 549 | m_PrefabInstance: {fileID: 0} 550 | m_PrefabAsset: {fileID: 0} 551 | m_GameObject: {fileID: 1171909195} 552 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 553 | m_LocalPosition: {x: 0, y: 0, z: 0} 554 | m_LocalScale: {x: 1, y: 1, z: 1} 555 | m_Children: [] 556 | m_Father: {fileID: 530256083} 557 | m_RootOrder: 0 558 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 559 | m_AnchorMin: {x: 0, y: 1} 560 | m_AnchorMax: {x: 1, y: 1} 561 | m_AnchoredPosition: {x: 0, y: 0} 562 | m_SizeDelta: {x: 0, y: 50} 563 | m_Pivot: {x: 0.5, y: 1} 564 | --- !u!114 &1171909197 565 | MonoBehaviour: 566 | m_ObjectHideFlags: 0 567 | m_CorrespondingSourceObject: {fileID: 0} 568 | m_PrefabInstance: {fileID: 0} 569 | m_PrefabAsset: {fileID: 0} 570 | m_GameObject: {fileID: 1171909195} 571 | m_Enabled: 1 572 | m_EditorHideFlags: 0 573 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 574 | m_Name: 575 | m_EditorClassIdentifier: 576 | m_Material: {fileID: 0} 577 | m_Color: {r: 1, g: 1, b: 1, a: 1} 578 | m_RaycastTarget: 1 579 | m_OnCullStateChanged: 580 | m_PersistentCalls: 581 | m_Calls: [] 582 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 583 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 584 | m_FontData: 585 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 586 | m_FontSize: 14 587 | m_FontStyle: 0 588 | m_BestFit: 0 589 | m_MinSize: 10 590 | m_MaxSize: 40 591 | m_Alignment: 4 592 | m_AlignByGeometry: 0 593 | m_RichText: 1 594 | m_HorizontalOverflow: 0 595 | m_VerticalOverflow: 0 596 | m_LineSpacing: 1 597 | m_Text: 'Demo5. Simple horizontal scroll with different items width and "pull-to-refresh" 598 | option. 599 | 600 | mopsicus.ru' 601 | --- !u!222 &1171909198 602 | CanvasRenderer: 603 | m_ObjectHideFlags: 0 604 | m_CorrespondingSourceObject: {fileID: 0} 605 | m_PrefabInstance: {fileID: 0} 606 | m_PrefabAsset: {fileID: 0} 607 | m_GameObject: {fileID: 1171909195} 608 | m_CullTransparentMesh: 0 609 | --- !u!1 &1174115147 610 | GameObject: 611 | m_ObjectHideFlags: 0 612 | m_CorrespondingSourceObject: {fileID: 0} 613 | m_PrefabInstance: {fileID: 0} 614 | m_PrefabAsset: {fileID: 0} 615 | serializedVersion: 6 616 | m_Component: 617 | - component: {fileID: 1174115149} 618 | - component: {fileID: 1174115148} 619 | m_Layer: 0 620 | m_Name: Scripts 621 | m_TagString: Untagged 622 | m_Icon: {fileID: 0} 623 | m_NavMeshLayer: 0 624 | m_StaticEditorFlags: 0 625 | m_IsActive: 1 626 | --- !u!114 &1174115148 627 | MonoBehaviour: 628 | m_ObjectHideFlags: 0 629 | m_CorrespondingSourceObject: {fileID: 0} 630 | m_PrefabInstance: {fileID: 0} 631 | m_PrefabAsset: {fileID: 0} 632 | m_GameObject: {fileID: 1174115147} 633 | m_Enabled: 1 634 | m_EditorHideFlags: 0 635 | m_Script: {fileID: 11500000, guid: dbc1a16294c67410fa3411f021fbad10, type: 3} 636 | m_Name: 637 | m_EditorClassIdentifier: 638 | Scroll: {fileID: 322971601} 639 | Count: 100 640 | PullCount: 25 641 | --- !u!4 &1174115149 642 | Transform: 643 | m_ObjectHideFlags: 0 644 | m_CorrespondingSourceObject: {fileID: 0} 645 | m_PrefabInstance: {fileID: 0} 646 | m_PrefabAsset: {fileID: 0} 647 | m_GameObject: {fileID: 1174115147} 648 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 649 | m_LocalPosition: {x: 0, y: 0, z: 0} 650 | m_LocalScale: {x: 1, y: 1, z: 1} 651 | m_Children: [] 652 | m_Father: {fileID: 0} 653 | m_RootOrder: 3 654 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 655 | --- !u!1 &1830380166 656 | GameObject: 657 | m_ObjectHideFlags: 0 658 | m_CorrespondingSourceObject: {fileID: 0} 659 | m_PrefabInstance: {fileID: 0} 660 | m_PrefabAsset: {fileID: 0} 661 | serializedVersion: 6 662 | m_Component: 663 | - component: {fileID: 1830380167} 664 | - component: {fileID: 1830380170} 665 | - component: {fileID: 1830380169} 666 | - component: {fileID: 1830380168} 667 | m_Layer: 5 668 | m_Name: LoadButton 669 | m_TagString: Untagged 670 | m_Icon: {fileID: 0} 671 | m_NavMeshLayer: 0 672 | m_StaticEditorFlags: 0 673 | m_IsActive: 1 674 | --- !u!224 &1830380167 675 | RectTransform: 676 | m_ObjectHideFlags: 0 677 | m_CorrespondingSourceObject: {fileID: 0} 678 | m_PrefabInstance: {fileID: 0} 679 | m_PrefabAsset: {fileID: 0} 680 | m_GameObject: {fileID: 1830380166} 681 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 682 | m_LocalPosition: {x: 0, y: 0, z: 0} 683 | m_LocalScale: {x: 1, y: 1, z: 1} 684 | m_Children: 685 | - {fileID: 1850385251} 686 | m_Father: {fileID: 1858008202} 687 | m_RootOrder: 0 688 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 689 | m_AnchorMin: {x: 0, y: 0} 690 | m_AnchorMax: {x: 0, y: 0} 691 | m_AnchoredPosition: {x: 0, y: 0} 692 | m_SizeDelta: {x: 0, y: 50} 693 | m_Pivot: {x: 0.5, y: 0.5} 694 | --- !u!114 &1830380168 695 | MonoBehaviour: 696 | m_ObjectHideFlags: 0 697 | m_CorrespondingSourceObject: {fileID: 0} 698 | m_PrefabInstance: {fileID: 0} 699 | m_PrefabAsset: {fileID: 0} 700 | m_GameObject: {fileID: 1830380166} 701 | m_Enabled: 1 702 | m_EditorHideFlags: 0 703 | m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} 704 | m_Name: 705 | m_EditorClassIdentifier: 706 | m_Navigation: 707 | m_Mode: 3 708 | m_SelectOnUp: {fileID: 0} 709 | m_SelectOnDown: {fileID: 0} 710 | m_SelectOnLeft: {fileID: 0} 711 | m_SelectOnRight: {fileID: 0} 712 | m_Transition: 1 713 | m_Colors: 714 | m_NormalColor: {r: 1, g: 1, b: 1, a: 1} 715 | m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} 716 | m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} 717 | m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} 718 | m_ColorMultiplier: 1 719 | m_FadeDuration: 0.1 720 | m_SpriteState: 721 | m_HighlightedSprite: {fileID: 0} 722 | m_PressedSprite: {fileID: 0} 723 | m_DisabledSprite: {fileID: 0} 724 | m_AnimationTriggers: 725 | m_NormalTrigger: Normal 726 | m_HighlightedTrigger: Highlighted 727 | m_PressedTrigger: Pressed 728 | m_DisabledTrigger: Disabled 729 | m_Interactable: 1 730 | m_TargetGraphic: {fileID: 1830380169} 731 | m_OnClick: 732 | m_PersistentCalls: 733 | m_Calls: 734 | - m_Target: {fileID: 1174115148} 735 | m_MethodName: SceneLoad 736 | m_Mode: 3 737 | m_Arguments: 738 | m_ObjectArgument: {fileID: 0} 739 | m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine 740 | m_IntArgument: 3 741 | m_FloatArgument: 0 742 | m_StringArgument: 743 | m_BoolArgument: 0 744 | m_CallState: 2 745 | m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, 746 | Culture=neutral, PublicKeyToken=null 747 | --- !u!114 &1830380169 748 | MonoBehaviour: 749 | m_ObjectHideFlags: 0 750 | m_CorrespondingSourceObject: {fileID: 0} 751 | m_PrefabInstance: {fileID: 0} 752 | m_PrefabAsset: {fileID: 0} 753 | m_GameObject: {fileID: 1830380166} 754 | m_Enabled: 1 755 | m_EditorHideFlags: 0 756 | m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} 757 | m_Name: 758 | m_EditorClassIdentifier: 759 | m_Material: {fileID: 0} 760 | m_Color: {r: 1, g: 1, b: 1, a: 1} 761 | m_RaycastTarget: 1 762 | m_OnCullStateChanged: 763 | m_PersistentCalls: 764 | m_Calls: [] 765 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 766 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 767 | m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} 768 | m_Type: 1 769 | m_PreserveAspect: 0 770 | m_FillCenter: 1 771 | m_FillMethod: 4 772 | m_FillAmount: 1 773 | m_FillClockwise: 1 774 | m_FillOrigin: 0 775 | m_UseSpriteMesh: 0 776 | --- !u!222 &1830380170 777 | CanvasRenderer: 778 | m_ObjectHideFlags: 0 779 | m_CorrespondingSourceObject: {fileID: 0} 780 | m_PrefabInstance: {fileID: 0} 781 | m_PrefabAsset: {fileID: 0} 782 | m_GameObject: {fileID: 1830380166} 783 | m_CullTransparentMesh: 0 784 | --- !u!1 &1850385250 785 | GameObject: 786 | m_ObjectHideFlags: 0 787 | m_CorrespondingSourceObject: {fileID: 0} 788 | m_PrefabInstance: {fileID: 0} 789 | m_PrefabAsset: {fileID: 0} 790 | serializedVersion: 6 791 | m_Component: 792 | - component: {fileID: 1850385251} 793 | - component: {fileID: 1850385253} 794 | - component: {fileID: 1850385252} 795 | m_Layer: 5 796 | m_Name: Text 797 | m_TagString: Untagged 798 | m_Icon: {fileID: 0} 799 | m_NavMeshLayer: 0 800 | m_StaticEditorFlags: 0 801 | m_IsActive: 1 802 | --- !u!224 &1850385251 803 | RectTransform: 804 | m_ObjectHideFlags: 0 805 | m_CorrespondingSourceObject: {fileID: 0} 806 | m_PrefabInstance: {fileID: 0} 807 | m_PrefabAsset: {fileID: 0} 808 | m_GameObject: {fileID: 1850385250} 809 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 810 | m_LocalPosition: {x: 0, y: 0, z: 0} 811 | m_LocalScale: {x: 1, y: 1, z: 1} 812 | m_Children: [] 813 | m_Father: {fileID: 1830380167} 814 | m_RootOrder: 0 815 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 816 | m_AnchorMin: {x: 0, y: 0} 817 | m_AnchorMax: {x: 1, y: 1} 818 | m_AnchoredPosition: {x: 0, y: 0} 819 | m_SizeDelta: {x: 0, y: 0} 820 | m_Pivot: {x: 0.5, y: 0.5} 821 | --- !u!114 &1850385252 822 | MonoBehaviour: 823 | m_ObjectHideFlags: 0 824 | m_CorrespondingSourceObject: {fileID: 0} 825 | m_PrefabInstance: {fileID: 0} 826 | m_PrefabAsset: {fileID: 0} 827 | m_GameObject: {fileID: 1850385250} 828 | m_Enabled: 1 829 | m_EditorHideFlags: 0 830 | m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3} 831 | m_Name: 832 | m_EditorClassIdentifier: 833 | m_Material: {fileID: 0} 834 | m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} 835 | m_RaycastTarget: 1 836 | m_OnCullStateChanged: 837 | m_PersistentCalls: 838 | m_Calls: [] 839 | m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, 840 | Version=1.0.0.0, Culture=neutral, PublicKeyToken=null 841 | m_FontData: 842 | m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} 843 | m_FontSize: 14 844 | m_FontStyle: 0 845 | m_BestFit: 0 846 | m_MinSize: 10 847 | m_MaxSize: 40 848 | m_Alignment: 4 849 | m_AlignByGeometry: 0 850 | m_RichText: 1 851 | m_HorizontalOverflow: 0 852 | m_VerticalOverflow: 0 853 | m_LineSpacing: 1 854 | m_Text: Previous demo 855 | --- !u!222 &1850385253 856 | CanvasRenderer: 857 | m_ObjectHideFlags: 0 858 | m_CorrespondingSourceObject: {fileID: 0} 859 | m_PrefabInstance: {fileID: 0} 860 | m_PrefabAsset: {fileID: 0} 861 | m_GameObject: {fileID: 1850385250} 862 | m_CullTransparentMesh: 0 863 | --- !u!1 &1858008201 864 | GameObject: 865 | m_ObjectHideFlags: 0 866 | m_CorrespondingSourceObject: {fileID: 0} 867 | m_PrefabInstance: {fileID: 0} 868 | m_PrefabAsset: {fileID: 0} 869 | serializedVersion: 6 870 | m_Component: 871 | - component: {fileID: 1858008202} 872 | - component: {fileID: 1858008203} 873 | m_Layer: 5 874 | m_Name: Header 875 | m_TagString: Untagged 876 | m_Icon: {fileID: 0} 877 | m_NavMeshLayer: 0 878 | m_StaticEditorFlags: 0 879 | m_IsActive: 1 880 | --- !u!224 &1858008202 881 | RectTransform: 882 | m_ObjectHideFlags: 0 883 | m_CorrespondingSourceObject: {fileID: 0} 884 | m_PrefabInstance: {fileID: 0} 885 | m_PrefabAsset: {fileID: 0} 886 | m_GameObject: {fileID: 1858008201} 887 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 888 | m_LocalPosition: {x: 0, y: 0, z: 0} 889 | m_LocalScale: {x: 1, y: 1, z: 1} 890 | m_Children: 891 | - {fileID: 1830380167} 892 | m_Father: {fileID: 530256083} 893 | m_RootOrder: 1 894 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 895 | m_AnchorMin: {x: 0, y: 1} 896 | m_AnchorMax: {x: 1, y: 1} 897 | m_AnchoredPosition: {x: 0, y: -50} 898 | m_SizeDelta: {x: 0, y: 50} 899 | m_Pivot: {x: 0.5, y: 1} 900 | --- !u!114 &1858008203 901 | MonoBehaviour: 902 | m_ObjectHideFlags: 0 903 | m_CorrespondingSourceObject: {fileID: 0} 904 | m_PrefabInstance: {fileID: 0} 905 | m_PrefabAsset: {fileID: 0} 906 | m_GameObject: {fileID: 1858008201} 907 | m_Enabled: 1 908 | m_EditorHideFlags: 0 909 | m_Script: {fileID: -405508275, guid: f70555f144d8491a825f0804e09c671c, type: 3} 910 | m_Name: 911 | m_EditorClassIdentifier: 912 | m_Padding: 913 | m_Left: 0 914 | m_Right: 0 915 | m_Top: 0 916 | m_Bottom: 0 917 | m_ChildAlignment: 0 918 | m_Spacing: 0 919 | m_ChildForceExpandWidth: 1 920 | m_ChildForceExpandHeight: 1 921 | m_ChildControlWidth: 1 922 | m_ChildControlHeight: 0 923 | --- !u!1 &1973094329 924 | GameObject: 925 | m_ObjectHideFlags: 0 926 | m_CorrespondingSourceObject: {fileID: 0} 927 | m_PrefabInstance: {fileID: 0} 928 | m_PrefabAsset: {fileID: 0} 929 | serializedVersion: 6 930 | m_Component: 931 | - component: {fileID: 1973094332} 932 | - component: {fileID: 1973094331} 933 | - component: {fileID: 1973094330} 934 | m_Layer: 0 935 | m_Name: EventSystem 936 | m_TagString: Untagged 937 | m_Icon: {fileID: 0} 938 | m_NavMeshLayer: 0 939 | m_StaticEditorFlags: 0 940 | m_IsActive: 1 941 | --- !u!114 &1973094330 942 | MonoBehaviour: 943 | m_ObjectHideFlags: 0 944 | m_CorrespondingSourceObject: {fileID: 0} 945 | m_PrefabInstance: {fileID: 0} 946 | m_PrefabAsset: {fileID: 0} 947 | m_GameObject: {fileID: 1973094329} 948 | m_Enabled: 1 949 | m_EditorHideFlags: 0 950 | m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3} 951 | m_Name: 952 | m_EditorClassIdentifier: 953 | m_HorizontalAxis: Horizontal 954 | m_VerticalAxis: Vertical 955 | m_SubmitButton: Submit 956 | m_CancelButton: Cancel 957 | m_InputActionsPerSecond: 10 958 | m_RepeatDelay: 0.5 959 | m_ForceModuleActive: 0 960 | --- !u!114 &1973094331 961 | MonoBehaviour: 962 | m_ObjectHideFlags: 0 963 | m_CorrespondingSourceObject: {fileID: 0} 964 | m_PrefabInstance: {fileID: 0} 965 | m_PrefabAsset: {fileID: 0} 966 | m_GameObject: {fileID: 1973094329} 967 | m_Enabled: 1 968 | m_EditorHideFlags: 0 969 | m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3} 970 | m_Name: 971 | m_EditorClassIdentifier: 972 | m_FirstSelected: {fileID: 0} 973 | m_sendNavigationEvents: 1 974 | m_DragThreshold: 10 975 | --- !u!4 &1973094332 976 | Transform: 977 | m_ObjectHideFlags: 0 978 | m_CorrespondingSourceObject: {fileID: 0} 979 | m_PrefabInstance: {fileID: 0} 980 | m_PrefabAsset: {fileID: 0} 981 | m_GameObject: {fileID: 1973094329} 982 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 983 | m_LocalPosition: {x: 0, y: 0, z: 0} 984 | m_LocalScale: {x: 1, y: 1, z: 1} 985 | m_Children: [] 986 | m_Father: {fileID: 0} 987 | m_RootOrder: 2 988 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 989 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scenes/Demo5.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fa7836ebcf532440e813a2bfdf3eb665 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4de01936281271943808652cb3008e0f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo1.cs: -------------------------------------------------------------------------------- 1 | using Mopsicus.InfiniteScroll; 2 | using UnityEngine; 3 | using UnityEngine.SceneManagement; 4 | using UnityEngine.UI; 5 | 6 | public class Demo1 : MonoBehaviour { 7 | 8 | [SerializeField] 9 | private InfiniteScroll Scroll; 10 | 11 | [SerializeField] 12 | private int Count = 100; 13 | 14 | void Start () { 15 | Scroll.OnFill += OnFillItem; 16 | Scroll.OnHeight += OnHeightItem; 17 | 18 | Scroll.InitData (Count); 19 | } 20 | 21 | void OnFillItem (int index, GameObject item) { 22 | item.GetComponentInChildren ().text = index.ToString (); 23 | } 24 | 25 | int OnHeightItem (int index) { 26 | return 150; 27 | } 28 | 29 | public void SceneLoad (int index) { 30 | SceneManager.LoadScene (index); 31 | } 32 | 33 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo1.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e1e3920ed4644e69826aeb6501ec933 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo2.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mopsicus.InfiniteScroll; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | using UnityEngine.UI; 6 | 7 | public class Demo2 : MonoBehaviour { 8 | 9 | [SerializeField] 10 | private InfiniteScroll Scroll; 11 | 12 | [SerializeField] 13 | private int Count = 7; 14 | 15 | [SerializeField] 16 | private int PullCount = 7; 17 | 18 | private List _list = new List (); 19 | 20 | void Start () { 21 | Scroll.OnFill += OnFillItem; 22 | Scroll.OnHeight += OnHeightItem; 23 | Scroll.OnPull += OnPullItem; 24 | for (int i = 0; i < Count; i++) { 25 | _list.Add (i); 26 | } 27 | Scroll.InitData (_list.Count); 28 | } 29 | 30 | void OnFillItem (int index, GameObject item) { 31 | item.GetComponentInChildren ().text = _list[index].ToString (); 32 | } 33 | 34 | int OnHeightItem (int index) { 35 | return 150; 36 | } 37 | 38 | void OnPullItem (InfiniteScroll.Direction direction) { 39 | int index = _list.Count; 40 | if (direction == InfiniteScroll.Direction.Top) { 41 | for (int i = 0; i < PullCount; i++) { 42 | _list.Insert (0, index); 43 | index++; 44 | } 45 | } else { 46 | for (int i = 0; i < PullCount; i++) { 47 | _list.Add (index); 48 | index++; 49 | } 50 | } 51 | Scroll.ApplyDataTo (_list.Count, PullCount, direction); 52 | } 53 | 54 | public void SceneLoad (int index) { 55 | SceneManager.LoadScene (index); 56 | } 57 | 58 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo2.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea8b44b54b839406aa681ed72b58ed04 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo3.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mopsicus.InfiniteScroll; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | using UnityEngine.UI; 6 | 7 | public class Demo3 : MonoBehaviour { 8 | 9 | [SerializeField] 10 | private InfiniteScroll Scroll; 11 | 12 | [SerializeField] 13 | private int Count = 100; 14 | 15 | [SerializeField] 16 | private int PullCount = 25; 17 | 18 | private List _list = new List (); 19 | 20 | private List _heights = new List (); 21 | 22 | void Start () { 23 | Scroll.OnFill += OnFillItem; 24 | Scroll.OnHeight += OnHeightItem; 25 | Scroll.OnPull += OnPullItem; 26 | for (int i = 0; i < Count; i++) { 27 | _list.Add (i); 28 | _heights.Add (Random.Range (100, 200)); 29 | } 30 | Scroll.InitData (_list.Count); 31 | } 32 | 33 | void OnFillItem (int index, GameObject item) { 34 | item.GetComponentInChildren ().text = _list[index].ToString (); 35 | } 36 | 37 | int OnHeightItem (int index) { 38 | return _heights[index]; 39 | } 40 | 41 | void OnPullItem (InfiniteScroll.Direction direction) { 42 | int index = _list.Count; 43 | if (direction == InfiniteScroll.Direction.Top) { 44 | for (int i = 0; i < PullCount; i++) { 45 | _list.Insert (0, index); 46 | _heights.Insert (0, Random.Range (100, 200)); 47 | index++; 48 | } 49 | } else { 50 | for (int i = 0; i < PullCount; i++) { 51 | _list.Add (index); 52 | _heights.Add (Random.Range (100, 200)); 53 | index++; 54 | } 55 | } 56 | Scroll.ApplyDataTo (_list.Count, PullCount, direction); 57 | } 58 | 59 | public void SceneLoad (int index) { 60 | SceneManager.LoadScene (index); 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo3.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 40d2eb8f020d2450585b1b76877874b0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo4.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mopsicus.InfiniteScroll; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | using UnityEngine.UI; 6 | 7 | public class Demo4 : MonoBehaviour { 8 | 9 | [SerializeField] 10 | private InfiniteScroll Scroll; 11 | 12 | [SerializeField] 13 | private int Count = 100; 14 | 15 | [SerializeField] 16 | private int PullCount = 25; 17 | 18 | private List _list = new List (); 19 | 20 | private List _heights = new List (); 21 | 22 | void Start () { 23 | Scroll.OnFill += OnFillItem; 24 | Scroll.OnHeight += OnHeightItem; 25 | Scroll.OnPull += OnPullItem; 26 | for (int i = 0; i < Count; i++) { 27 | _list.Add (i); 28 | _heights.Add (Random.Range (100, 200)); 29 | } 30 | Scroll.InitData (_list.Count); 31 | } 32 | 33 | void OnFillItem (int index, GameObject item) { 34 | item.GetComponentInChildren ().text = _list[index].ToString (); 35 | } 36 | 37 | int OnHeightItem (int index) { 38 | return _heights[index]; 39 | } 40 | 41 | void OnPullItem (InfiniteScroll.Direction direction) { 42 | int index = _list.Count; 43 | if (direction == InfiniteScroll.Direction.Top) { 44 | for (int i = 0; i < PullCount; i++) { 45 | _list.Insert (0, index); 46 | _heights.Insert (0, Random.Range (100, 200)); 47 | index++; 48 | } 49 | } else { 50 | for (int i = 0; i < PullCount; i++) { 51 | _list.Add (index); 52 | _heights.Add (Random.Range (100, 200)); 53 | index++; 54 | } 55 | } 56 | Scroll.ApplyDataTo (_list.Count, PullCount, direction); 57 | } 58 | 59 | public void RemoveItem (int index) { 60 | _list.RemoveAt (index); 61 | _heights.RemoveAt (index); 62 | Scroll.Recycle (index); 63 | } 64 | 65 | public void SceneLoad (int index) { 66 | SceneManager.LoadScene (index); 67 | } 68 | 69 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo4.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d531bba42ee004c5fa8246f863ae7844 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo5.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Mopsicus.InfiniteScroll; 3 | using UnityEngine; 4 | using UnityEngine.SceneManagement; 5 | using UnityEngine.UI; 6 | 7 | public class Demo5 : MonoBehaviour { 8 | 9 | [SerializeField] 10 | private InfiniteScroll Scroll; 11 | 12 | [SerializeField] 13 | private int Count = 100; 14 | 15 | [SerializeField] 16 | private int PullCount = 25; 17 | 18 | private List _list = new List (); 19 | 20 | private List _widths = new List (); 21 | 22 | void Start () { 23 | Scroll.OnFill += OnFillItem; 24 | Scroll.OnWidth += OnWidthItem; 25 | Scroll.OnPull += OnPullItem; 26 | for (int i = 0; i < Count; i++) { 27 | _list.Add (i); 28 | _widths.Add (Random.Range (100, 200)); 29 | } 30 | Scroll.InitData (_list.Count); 31 | } 32 | 33 | void OnFillItem (int index, GameObject item) { 34 | item.GetComponentInChildren ().text = _list[index].ToString (); 35 | } 36 | 37 | int OnWidthItem (int index) { 38 | return _widths[index]; 39 | } 40 | 41 | void OnPullItem (InfiniteScroll.Direction direction) { 42 | int index = _list.Count; 43 | if (direction == InfiniteScroll.Direction.Top) { 44 | for (int i = 0; i < PullCount; i++) { 45 | _list.Insert (0, index); 46 | _widths.Insert (0, Random.Range (100, 200)); 47 | index++; 48 | } 49 | } else { 50 | for (int i = 0; i < PullCount; i++) { 51 | _list.Add (index); 52 | _widths.Add (Random.Range (100, 200)); 53 | index++; 54 | } 55 | } 56 | Scroll.ApplyDataTo (_list.Count, PullCount, direction); 57 | } 58 | 59 | public void SceneLoad (int index) { 60 | SceneManager.LoadScene (index); 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/Demo5.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbc1a16294c67410fa3411f021fbad10 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/InfiniteScroll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cd3f8572bdbea47d4a27d64616792316 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/InfiniteScroll/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2c4744e27d7c14822bbe420085d32a7c 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/InfiniteScroll/Editor/InfiniteScrollEditor.cs: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // The MIT License 3 | // InfiniteScroll https://github.com/mopsicus/infinite-scroll-unity 4 | // Copyright (c) 2018-2019 Mopsicus 5 | // ---------------------------------------------------------------------------- 6 | 7 | using UnityEditor; 8 | using UnityEngine; 9 | 10 | namespace Mopsicus.InfiniteScroll { 11 | 12 | [CustomEditor (typeof (InfiniteScroll))] 13 | public class InfiniteScrollEditor : Editor { 14 | 15 | /// 16 | /// Scroller target 17 | /// 18 | private InfiniteScroll _target; 19 | 20 | /// 21 | /// Serialized target object 22 | /// 23 | private SerializedObject _object; 24 | 25 | /// 26 | /// Item list prefab 27 | /// 28 | private SerializedProperty _prefab; 29 | 30 | /// 31 | /// Top padding 32 | /// 33 | private SerializedProperty _topPadding; 34 | 35 | /// 36 | /// Bottom padding 37 | /// 38 | private SerializedProperty _bottomPadding; 39 | 40 | /// 41 | /// Spacing between items 42 | /// 43 | private SerializedProperty _itemSpacing; 44 | 45 | /// 46 | /// Label font asset 47 | /// 48 | private SerializedProperty _labelsFont; 49 | 50 | /// 51 | /// Pull top text label 52 | /// 53 | private SerializedProperty _topPullLabel; 54 | 55 | /// 56 | /// Release top text label 57 | /// 58 | private SerializedProperty _topReleaseLabel; 59 | 60 | /// 61 | /// Pull bottom text label 62 | /// 63 | private SerializedProperty _bottomPullLabel; 64 | 65 | /// 66 | /// Release bottom text label 67 | /// 68 | private SerializedProperty _bottomReleaseLabel; 69 | 70 | /// 71 | /// Can we pull from top 72 | /// 73 | private SerializedProperty _isPullTop; 74 | 75 | /// 76 | /// Can we pull from bottom 77 | /// 78 | private SerializedProperty _isPullBottom; 79 | 80 | /// 81 | /// Left padding 82 | /// 83 | private SerializedProperty _leftPadding; 84 | 85 | /// 86 | /// Right padding 87 | /// 88 | private SerializedProperty _rightPadding; 89 | 90 | /// 91 | /// Pull left text label 92 | /// 93 | private SerializedProperty _leftPullLabel; 94 | 95 | /// 96 | /// Release left text label 97 | /// 98 | private SerializedProperty _leftReleaseLabel; 99 | 100 | /// 101 | /// Pull right text label 102 | /// 103 | private SerializedProperty _rightPullLabel; 104 | 105 | /// 106 | /// Release right text label 107 | /// 108 | private SerializedProperty _rightReleaseLabel; 109 | 110 | /// 111 | /// Can we pull from left 112 | /// 113 | private SerializedProperty _isPullLeft; 114 | 115 | /// 116 | /// Can we pull from right 117 | /// 118 | private SerializedProperty _isPullRight; 119 | 120 | /// 121 | /// Coefficient when labels should action 122 | /// 123 | private SerializedProperty _pullValue; 124 | 125 | /// 126 | /// Label position offset 127 | /// 128 | private SerializedProperty _labelOffset; 129 | 130 | /// 131 | /// Init data 132 | /// 133 | private void OnEnable () { 134 | _target = (InfiniteScroll) target; 135 | _object = new SerializedObject (target); 136 | _prefab = _object.FindProperty ("Prefab"); 137 | _topPadding = _object.FindProperty ("TopPadding"); 138 | _bottomPadding = _object.FindProperty ("BottomPadding"); 139 | _itemSpacing = _object.FindProperty ("ItemSpacing"); 140 | _labelsFont = _object.FindProperty ("LabelsFont"); 141 | _topPullLabel = _object.FindProperty ("TopPullLabel"); 142 | _topReleaseLabel = _object.FindProperty ("TopReleaseLabel"); 143 | _bottomPullLabel = _object.FindProperty ("BottomPullLabel"); 144 | _bottomReleaseLabel = _object.FindProperty ("BottomReleaseLabel"); 145 | _isPullTop = _object.FindProperty ("IsPullTop"); 146 | _isPullBottom = _object.FindProperty ("IsPullBottom"); 147 | _leftPadding = _object.FindProperty ("LeftPadding"); 148 | _rightPadding = _object.FindProperty ("RightPadding"); 149 | _leftPullLabel = _object.FindProperty ("LeftPullLabel"); 150 | _leftReleaseLabel = _object.FindProperty ("LeftReleaseLabel"); 151 | _rightPullLabel = _object.FindProperty ("RightPullLabel"); 152 | _rightReleaseLabel = _object.FindProperty ("RightReleaseLabel"); 153 | _isPullLeft = _object.FindProperty ("IsPullLeft"); 154 | _isPullRight = _object.FindProperty ("IsPullRight"); 155 | _pullValue = _object.FindProperty ("PullValue"); 156 | _labelOffset = _object.FindProperty ("LabelOffset"); 157 | } 158 | 159 | /// 160 | /// Draw inspector 161 | /// 162 | public override void OnInspectorGUI () { 163 | _object.Update (); 164 | EditorGUI.BeginChangeCheck (); 165 | _target.Type = GUILayout.Toolbar (_target.Type, new string[] { "Vertical", "Horizontal" }); 166 | switch (_target.Type) { 167 | case 0: 168 | EditorGUILayout.PropertyField (_prefab); 169 | EditorGUILayout.PropertyField (_topPadding); 170 | EditorGUILayout.PropertyField (_bottomPadding); 171 | EditorGUILayout.PropertyField (_itemSpacing); 172 | EditorGUILayout.PropertyField (_labelsFont); 173 | EditorGUILayout.PropertyField (_topPullLabel); 174 | EditorGUILayout.PropertyField (_topReleaseLabel); 175 | EditorGUILayout.PropertyField (_bottomPullLabel); 176 | EditorGUILayout.PropertyField (_bottomReleaseLabel); 177 | EditorGUILayout.PropertyField (_isPullTop); 178 | EditorGUILayout.PropertyField (_isPullBottom); 179 | EditorGUILayout.PropertyField (_pullValue); 180 | EditorGUILayout.PropertyField (_labelOffset); 181 | break; 182 | case 1: 183 | EditorGUILayout.PropertyField (_prefab); 184 | EditorGUILayout.PropertyField (_leftPadding); 185 | EditorGUILayout.PropertyField (_rightPadding); 186 | EditorGUILayout.PropertyField (_itemSpacing); 187 | EditorGUILayout.PropertyField (_labelsFont); 188 | EditorGUILayout.PropertyField (_leftPullLabel); 189 | EditorGUILayout.PropertyField (_leftReleaseLabel); 190 | EditorGUILayout.PropertyField (_rightPullLabel); 191 | EditorGUILayout.PropertyField (_rightReleaseLabel); 192 | EditorGUILayout.PropertyField (_isPullLeft); 193 | EditorGUILayout.PropertyField (_isPullRight); 194 | EditorGUILayout.PropertyField (_pullValue); 195 | EditorGUILayout.PropertyField (_labelOffset); 196 | break; 197 | default: 198 | break; 199 | } 200 | if (EditorGUI.EndChangeCheck ()) { 201 | _object.ApplyModifiedProperties (); 202 | } 203 | } 204 | 205 | } 206 | 207 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/InfiniteScroll/Editor/InfiniteScrollEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: adea54ae6a4d946fe9628dc228f4ea99 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/InfiniteScroll/InfiniteScroll.cs: -------------------------------------------------------------------------------- 1 | // ---------------------------------------------------------------------------- 2 | // The MIT License 3 | // InfiniteScroll https://github.com/mopsicus/infinite-scroll-unity 4 | // Copyright (c) 2018-2021 Mopsicus 5 | // ---------------------------------------------------------------------------- 6 | 7 | using System; 8 | using System.Collections; 9 | using System.Collections.Generic; 10 | using TMPro; 11 | using UnityEngine; 12 | using UnityEngine.EventSystems; 13 | using UnityEngine.UI; 14 | 15 | namespace Mopsicus.InfiniteScroll { 16 | 17 | /// 18 | /// Infinite scroller for long lists 19 | /// 20 | public class InfiniteScroll : MonoBehaviour, IDropHandler { 21 | 22 | /// 23 | /// Period for no-update list, if very fast add 24 | /// 25 | private const int UPDATE_TIME_DIFF = 500; 26 | 27 | /// 28 | /// Speed for scroll on move 29 | /// 30 | private const float SCROLL_SPEED = 50f; 31 | 32 | /// 33 | /// Duration for scroll move 34 | /// 35 | private const float SCROLL_DURATION = 0.25f; 36 | 37 | /// 38 | /// Load direction 39 | /// 40 | public enum Direction { 41 | Top = 0, 42 | Bottom = 1, 43 | Left = 2, 44 | Right = 3 45 | } 46 | 47 | /// 48 | /// Event for get item height 49 | /// 50 | public Func OnHeight; 51 | 52 | /// 53 | /// Event for get item width 54 | /// 55 | public Func OnWidth; 56 | 57 | /// 58 | /// Callback on item fill 59 | /// 60 | public Action OnFill; 61 | 62 | /// 63 | /// Callback on pull action 64 | /// 65 | public Action OnPull; 66 | 67 | [Header ("Item settings")] 68 | /// 69 | /// Item list prefab 70 | /// 71 | public GameObject Prefab; 72 | 73 | [Header ("Padding")] 74 | /// 75 | /// Top padding 76 | /// 77 | public int TopPadding = 10; 78 | 79 | /// 80 | /// Bottom padding 81 | /// 82 | public int BottomPadding = 10; 83 | 84 | [Header ("Padding")] 85 | /// 86 | /// Left padding 87 | /// 88 | public int LeftPadding = 10; 89 | 90 | /// 91 | /// Right padding 92 | /// 93 | public int RightPadding = 10; 94 | 95 | /// 96 | /// Spacing between items 97 | /// 98 | public int ItemSpacing = 2; 99 | 100 | [Header ("Labels")] 101 | /// 102 | /// Label font asset 103 | /// 104 | public TMP_FontAsset LabelsFont; 105 | 106 | /// 107 | /// Pull top text label 108 | /// 109 | public string TopPullLabel = "Pull to refresh"; 110 | 111 | /// 112 | /// Release top text label 113 | /// 114 | public string TopReleaseLabel = "Release to load"; 115 | 116 | /// 117 | /// Pull bottom text label 118 | /// 119 | public string BottomPullLabel = "Pull to refresh"; 120 | 121 | /// 122 | /// Release bottom text label 123 | /// 124 | public string BottomReleaseLabel = "Release to load"; 125 | 126 | /// 127 | /// Pull left text label 128 | /// 129 | public string LeftPullLabel = "Pull to refresh"; 130 | 131 | /// 132 | /// Release left text label 133 | /// 134 | public string LeftReleaseLabel = "Release to load"; 135 | 136 | /// 137 | /// Pull right text label 138 | /// 139 | public string RightPullLabel = "Pull to refresh"; 140 | 141 | /// 142 | /// Release right text label 143 | /// 144 | public string RightReleaseLabel = "Release to load"; 145 | 146 | [Header ("Directions")] 147 | /// 148 | /// Can we pull from top 149 | /// 150 | public bool IsPullTop = true; 151 | 152 | /// 153 | /// Can we pull from bottom 154 | /// 155 | public bool IsPullBottom = true; 156 | 157 | [Header ("Directions")] 158 | /// 159 | /// Can we pull from left 160 | /// 161 | public bool IsPullLeft = true; 162 | 163 | /// 164 | /// Can we pull from right 165 | /// 166 | public bool IsPullRight = true; 167 | 168 | [Header ("Offsets")] 169 | /// 170 | /// Coefficient when labels should action 171 | /// 172 | public float PullValue = 1.5f; 173 | 174 | /// 175 | /// Label position offset 176 | /// 177 | public float LabelOffset = 85f; 178 | 179 | [HideInInspector] 180 | /// 181 | /// Top label 182 | /// 183 | public TextMeshProUGUI TopLabel; 184 | 185 | [HideInInspector] 186 | /// 187 | /// Bottom label 188 | /// 189 | public TextMeshProUGUI BottomLabel; 190 | 191 | [HideInInspector] 192 | /// 193 | /// Left label 194 | /// 195 | public TextMeshProUGUI LeftLabel; 196 | 197 | [HideInInspector] 198 | /// 199 | /// Right label 200 | /// 201 | public TextMeshProUGUI RightLabel; 202 | 203 | /// 204 | /// Type of scroller 205 | /// 206 | [HideInInspector] 207 | public int Type; 208 | 209 | /// 210 | /// Scrollrect cache 211 | /// 212 | private ScrollRect _scroll; 213 | 214 | /// 215 | /// Content rect cache 216 | /// 217 | private RectTransform _content; 218 | 219 | /// 220 | /// Container rect cache 221 | /// 222 | private Rect _container; 223 | 224 | /// 225 | /// All rects cache 226 | /// 227 | private RectTransform[] _rects; 228 | 229 | /// 230 | /// All objects cache 231 | /// 232 | private GameObject[] _views; 233 | 234 | /// 235 | /// State is can we pull from top 236 | /// 237 | private bool _isCanLoadUp; 238 | 239 | /// 240 | /// State is can we pull from bottom 241 | /// 242 | private bool _isCanLoadDown; 243 | 244 | /// 245 | /// State is can we pull from left 246 | /// 247 | private bool _isCanLoadLeft; 248 | 249 | /// 250 | /// State is can we pull from right 251 | /// 252 | private bool _isCanLoadRight; 253 | 254 | /// 255 | /// Previous position 256 | /// 257 | private int _previousPosition = -1; 258 | 259 | /// 260 | /// List items count 261 | /// 262 | private int _count; 263 | 264 | /// 265 | /// Items heights cache 266 | /// 267 | private Dictionary _heights; 268 | 269 | /// 270 | /// Items widths cache 271 | /// 272 | private Dictionary _widths; 273 | 274 | /// 275 | /// Items positions cache 276 | /// 277 | private Dictionary _positions; 278 | 279 | /// 280 | /// Last manual move time to end 281 | /// 282 | private DateTime _lastMoveTime; 283 | 284 | /// 285 | /// Cache for scroll position 286 | /// 287 | private float _previousScrollPosition; 288 | 289 | /// 290 | /// Cache position for prevent sides effects 291 | /// 292 | private int _saveStepPosition = -1; 293 | 294 | /// 295 | /// Constructor 296 | /// 297 | void Awake () { 298 | _container = GetComponent ().rect; 299 | _scroll = GetComponent (); 300 | _scroll.onValueChanged.AddListener (OnScrollChange); 301 | _content = _scroll.viewport.transform.GetChild (0).GetComponent (); 302 | _heights = new Dictionary (); 303 | _widths = new Dictionary (); 304 | _positions = new Dictionary (); 305 | CreateLabels (); 306 | } 307 | 308 | /// 309 | /// Main loop to check items positions and heights 310 | /// 311 | void Update () { 312 | if (Type == 0) { 313 | UpdateVertical (); 314 | } else { 315 | UpdateHorizontal (); 316 | } 317 | } 318 | 319 | /// 320 | /// Main loop for vertical 321 | /// 322 | void UpdateVertical () { 323 | if (_count == 0) { 324 | return; 325 | } 326 | float _topPosition = _content.anchoredPosition.y - ItemSpacing; 327 | if (_topPosition <= 0f && _rects[0].anchoredPosition.y < -TopPadding - 10f) { 328 | InitData (_count); 329 | return; 330 | } 331 | if (_topPosition < 0f) { 332 | return; 333 | } 334 | if (!_positions.ContainsKey(_previousPosition) || !_heights.ContainsKey(_previousPosition)) { 335 | return; 336 | } 337 | float itemPosition = Mathf.Abs (_positions[_previousPosition]) + _heights[_previousPosition]; 338 | int position = (_topPosition > itemPosition) ? _previousPosition + 1 : _previousPosition - 1; 339 | int border = (int) (_positions[0] + _heights[0]); 340 | int step = (int) ((_topPosition + _topPosition / 1.25f) / border); 341 | if (step != _saveStepPosition) { 342 | _saveStepPosition = step; 343 | } else { 344 | return; 345 | } 346 | if (position < 0 || _previousPosition == position || _scroll.velocity.y == 0f) { 347 | return; 348 | } 349 | if (position > _previousPosition) { 350 | if (position - _previousPosition > 1) { 351 | position = _previousPosition + 1; 352 | } 353 | int newPosition = position % _views.Length; 354 | newPosition--; 355 | if (newPosition < 0) { 356 | newPosition = _views.Length - 1; 357 | } 358 | int index = position + _views.Length - 1; 359 | if (index < _count) { 360 | Vector2 pos = _rects[newPosition].anchoredPosition; 361 | pos.y = _positions[index]; 362 | _rects[newPosition].anchoredPosition = pos; 363 | Vector2 size = _rects[newPosition].sizeDelta; 364 | size.y = _heights[index]; 365 | _rects[newPosition].sizeDelta = size; 366 | _views[newPosition].name = index.ToString (); 367 | OnFill (index, _views[newPosition]); 368 | } 369 | } else { 370 | if (_previousPosition - position > 1) { 371 | position = _previousPosition - 1; 372 | } 373 | int newIndex = position % _views.Length; 374 | Vector2 pos = _rects[newIndex].anchoredPosition; 375 | pos.y = _positions[position]; 376 | _rects[newIndex].anchoredPosition = pos; 377 | Vector2 size = _rects[newIndex].sizeDelta; 378 | size.y = _heights[position]; 379 | _rects[newIndex].sizeDelta = size; 380 | _views[newIndex].name = position.ToString (); 381 | OnFill (position, _views[newIndex]); 382 | } 383 | _previousPosition = position; 384 | } 385 | 386 | /// 387 | /// Main loop for horizontal 388 | /// 389 | void UpdateHorizontal () { 390 | if (_count == 0) { 391 | return; 392 | } 393 | float _leftPosition = _content.anchoredPosition.x * -1f - ItemSpacing; 394 | if (_leftPosition <= 0f && _rects[0].anchoredPosition.x < -LeftPadding - 10f) { 395 | InitData (_count); 396 | return; 397 | } 398 | if (_leftPosition < 0f) { 399 | return; 400 | } 401 | if (!_positions.ContainsKey(_previousPosition) || !_widths.ContainsKey(_previousPosition)) { 402 | return; 403 | } 404 | float itemPosition = Mathf.Abs (_positions[_previousPosition]) + _widths[_previousPosition]; 405 | int position = (_leftPosition > itemPosition) ? _previousPosition + 1 : _previousPosition - 1; 406 | int border = (int) (_positions[0] + _widths[0]); 407 | int step = (int) ((_leftPosition + _leftPosition / 1.25f) / border); 408 | if (step != _saveStepPosition) { 409 | _saveStepPosition = step; 410 | } else { 411 | return; 412 | } 413 | if (position < 0 || _previousPosition == position || _scroll.velocity.x == 0f) { 414 | return; 415 | } 416 | if (position > _previousPosition) { 417 | if (position - _previousPosition > 1) { 418 | position = _previousPosition + 1; 419 | } 420 | int newPosition = position % _views.Length; 421 | newPosition--; 422 | if (newPosition < 0) { 423 | newPosition = _views.Length - 1; 424 | } 425 | int index = position + _views.Length - 1; 426 | if (index < _count) { 427 | Vector2 pos = _rects[newPosition].anchoredPosition; 428 | pos.x = _positions[index]; 429 | _rects[newPosition].anchoredPosition = pos; 430 | Vector2 size = _rects[newPosition].sizeDelta; 431 | size.x = _widths[index]; 432 | _rects[newPosition].sizeDelta = size; 433 | _views[newPosition].name = index.ToString (); 434 | OnFill (index, _views[newPosition]); 435 | } 436 | } else { 437 | if (_previousPosition - position > 1) { 438 | position = _previousPosition - 1; 439 | } 440 | int newIndex = position % _views.Length; 441 | Vector2 pos = _rects[newIndex].anchoredPosition; 442 | pos.x = _positions[position]; 443 | _rects[newIndex].anchoredPosition = pos; 444 | Vector2 size = _rects[newIndex].sizeDelta; 445 | size.x = _widths[position]; 446 | _rects[newIndex].sizeDelta = size; 447 | _views[newIndex].name = position.ToString (); 448 | OnFill (position, _views[newIndex]); 449 | } 450 | _previousPosition = position; 451 | } 452 | 453 | /// 454 | /// Handler on scroller 455 | /// 456 | void OnScrollChange (Vector2 vector) { 457 | if (Type == 0) { 458 | ScrollChangeVertical (vector); 459 | } else { 460 | ScrollChangeHorizontal (vector); 461 | } 462 | } 463 | 464 | /// 465 | /// Handler on vertical scroll change 466 | /// 467 | void ScrollChangeVertical (Vector2 vector) { 468 | _isCanLoadUp = false; 469 | _isCanLoadDown = false; 470 | if (_views == null) { 471 | return; 472 | } 473 | float y = 0f; 474 | float z = 0f; 475 | bool isScrollable = (_scroll.verticalNormalizedPosition != 1f && _scroll.verticalNormalizedPosition != 0f); 476 | y = _content.anchoredPosition.y; 477 | if (isScrollable) { 478 | if (_scroll.verticalNormalizedPosition < 0f) { 479 | z = y - _previousScrollPosition; 480 | } else { 481 | _previousScrollPosition = y; 482 | } 483 | } else { 484 | z = y; 485 | } 486 | if (y < -LabelOffset && IsPullTop) { 487 | TopLabel.gameObject.SetActive (true); 488 | TopLabel.text = TopPullLabel; 489 | if (y < -LabelOffset * PullValue) { 490 | TopLabel.text = TopReleaseLabel; 491 | _isCanLoadUp = true; 492 | } 493 | } else { 494 | TopLabel.gameObject.SetActive (false); 495 | } 496 | if (z > LabelOffset && IsPullBottom) { 497 | BottomLabel.gameObject.SetActive (true); 498 | BottomLabel.text = BottomPullLabel; 499 | if (z > LabelOffset * PullValue) { 500 | BottomLabel.text = BottomReleaseLabel; 501 | _isCanLoadDown = true; 502 | } 503 | } else { 504 | BottomLabel.gameObject.SetActive (false); 505 | } 506 | } 507 | 508 | /// 509 | /// Handler on horizontal scroll change 510 | /// 511 | void ScrollChangeHorizontal (Vector2 vector) { 512 | _isCanLoadLeft = false; 513 | _isCanLoadRight = false; 514 | if (_views == null) { 515 | return; 516 | } 517 | float x = 0f; 518 | float z = 0f; 519 | bool isScrollable = (_scroll.horizontalNormalizedPosition != 1f && _scroll.horizontalNormalizedPosition != 0f); 520 | x = _content.anchoredPosition.x; 521 | if (isScrollable) { 522 | if (_scroll.horizontalNormalizedPosition > 1f) { 523 | z = x - _previousScrollPosition; 524 | } else { 525 | _previousScrollPosition = x; 526 | } 527 | } else { 528 | z = x; 529 | } 530 | if (x > LabelOffset && IsPullLeft) { 531 | LeftLabel.gameObject.SetActive (true); 532 | LeftLabel.text = LeftPullLabel; 533 | if (x > LabelOffset * PullValue) { 534 | LeftLabel.text = LeftReleaseLabel; 535 | _isCanLoadLeft = true; 536 | } 537 | } else { 538 | LeftLabel.gameObject.SetActive (false); 539 | } 540 | if (z < -LabelOffset && IsPullRight) { 541 | RightLabel.gameObject.SetActive (true); 542 | RightLabel.text = RightPullLabel; 543 | if (z < -LabelOffset * PullValue) { 544 | RightLabel.text = RightReleaseLabel; 545 | _isCanLoadRight = true; 546 | } 547 | } else { 548 | RightLabel.gameObject.SetActive (false); 549 | } 550 | } 551 | 552 | /// 553 | /// Hander on scroller drop pull 554 | /// 555 | public void OnDrop (PointerEventData eventData) { 556 | if (Type == 0) { 557 | DropVertical (); 558 | } else { 559 | DropHorizontal (); 560 | } 561 | } 562 | 563 | /// 564 | /// Handler on scroller vertical drop 565 | /// 566 | void DropVertical () { 567 | if (_isCanLoadUp) { 568 | OnPull (Direction.Top); 569 | } else if (_isCanLoadDown) { 570 | OnPull (Direction.Bottom); 571 | } 572 | _isCanLoadUp = false; 573 | _isCanLoadDown = false; 574 | } 575 | 576 | /// 577 | /// Handler on scroller horizontal drop 578 | /// 579 | void DropHorizontal () { 580 | if (_isCanLoadLeft) { 581 | OnPull (Direction.Left); 582 | } else if (_isCanLoadRight) { 583 | OnPull (Direction.Right); 584 | } 585 | _isCanLoadLeft = false; 586 | _isCanLoadRight = false; 587 | } 588 | 589 | /// 590 | /// Init list 591 | /// 592 | /// Items count 593 | public void InitData (int count) { 594 | if (Type == 0) { 595 | InitVertical (count); 596 | } else { 597 | InitHorizontal (count); 598 | } 599 | } 600 | 601 | /// 602 | /// Init vertical list 603 | /// 604 | /// Item count 605 | void InitVertical (int count) { 606 | float height = CalcSizesPositions (count); 607 | CreateViews (); 608 | _previousPosition = 0; 609 | _count = count; 610 | _content.sizeDelta = new Vector2 (_content.sizeDelta.x, height); 611 | Vector2 pos = _content.anchoredPosition; 612 | Vector2 size = Vector2.zero; 613 | pos.y = 0f; 614 | _content.anchoredPosition = pos; 615 | int y = TopPadding; 616 | bool showed = false; 617 | for (int i = 0; i < _views.Length; i++) { 618 | showed = i < count; 619 | _views[i].gameObject.SetActive (showed); 620 | if (i + 1 > _count) { 621 | continue; 622 | } 623 | pos = _rects[i].anchoredPosition; 624 | pos.y = _positions[i]; 625 | pos.x = 0f; 626 | _rects[i].anchoredPosition = pos; 627 | size = _rects[i].sizeDelta; 628 | size.y = _heights[i]; 629 | _rects[i].sizeDelta = size; 630 | y += ItemSpacing + _heights[i]; 631 | _views[i].name = i.ToString (); 632 | OnFill (i, _views[i]); 633 | } 634 | } 635 | 636 | /// 637 | /// Init horizontal list 638 | /// 639 | /// Item count 640 | void InitHorizontal (int count) { 641 | float width = CalcSizesPositions (count); 642 | CreateViews (); 643 | _previousPosition = 0; 644 | _count = count; 645 | _content.sizeDelta = new Vector2 (width, _content.sizeDelta.y); 646 | Vector2 pos = _content.anchoredPosition; 647 | Vector2 size = Vector2.zero; 648 | pos.x = 0f; 649 | _content.anchoredPosition = pos; 650 | int x = LeftPadding; 651 | bool showed = false; 652 | for (int i = 0; i < _views.Length; i++) { 653 | showed = i < count; 654 | _views[i].gameObject.SetActive (showed); 655 | if (i + 1 > _count) { 656 | continue; 657 | } 658 | pos = _rects[i].anchoredPosition; 659 | pos.x = _positions[i]; 660 | pos.y = 0f; 661 | _rects[i].anchoredPosition = pos; 662 | size = _rects[i].sizeDelta; 663 | size.x = _widths[i]; 664 | _rects[i].sizeDelta = size; 665 | x += ItemSpacing + _widths[i]; 666 | _views[i].name = i.ToString (); 667 | OnFill (i, _views[i]); 668 | } 669 | } 670 | 671 | /// 672 | /// Calc all items height and positions 673 | /// 674 | /// Common content height 675 | float CalcSizesPositions (int count) { 676 | return (Type == 0) ? CalcSizesPositionsVertical (count) : CalcSizesPositionsHorizontal (count); 677 | } 678 | 679 | /// 680 | /// Calc all items height and positions 681 | /// 682 | /// Common content height 683 | float CalcSizesPositionsVertical (int count) { 684 | _heights.Clear (); 685 | _positions.Clear (); 686 | float result = 0f; 687 | for (int i = 0; i < count; i++) { 688 | _heights[i] = OnHeight (i); 689 | _positions[i] = -(TopPadding + i * ItemSpacing + result); 690 | result += _heights[i]; 691 | } 692 | result += TopPadding + BottomPadding + (count == 0 ? 0 : ((count - 1) * ItemSpacing)); 693 | return result; 694 | } 695 | 696 | /// 697 | /// Calc all items width and positions 698 | /// 699 | /// Common content width 700 | float CalcSizesPositionsHorizontal (int count) { 701 | _widths.Clear (); 702 | _positions.Clear (); 703 | float result = 0f; 704 | for (int i = 0; i < count; i++) { 705 | _widths[i] = OnWidth (i); 706 | _positions[i] = LeftPadding + i * ItemSpacing + result; 707 | result += _widths[i]; 708 | } 709 | result += LeftPadding + RightPadding + (count == 0 ? 0 : ((count - 1) * ItemSpacing)); 710 | return result; 711 | } 712 | 713 | /// 714 | /// Update list after load new items 715 | /// 716 | /// Total items count 717 | /// Added items count 718 | /// Direction to add 719 | public void ApplyDataTo (int count, int newCount, Direction direction) { 720 | if (Type == 0) { 721 | ApplyDataToVertical (count, newCount, direction); 722 | } else { 723 | ApplyDataToHorizontal (count, newCount, direction); 724 | } 725 | } 726 | 727 | /// 728 | /// Update list after load new items for vertical scroller 729 | /// 730 | /// Total items count 731 | /// Added items count 732 | /// Direction to add 733 | void ApplyDataToVertical (int count, int newCount, Direction direction) { 734 | _count = count; 735 | if (_count <= _views.Length) { 736 | InitData (count); 737 | return; 738 | } 739 | float height = CalcSizesPositions (count); 740 | _content.sizeDelta = new Vector2 (_content.sizeDelta.x, height); 741 | Vector2 pos = _content.anchoredPosition; 742 | if (direction == Direction.Top) { 743 | float y = 0f; 744 | for (int i = 0; i < newCount; i++) { 745 | y += _heights[i] + ItemSpacing; 746 | } 747 | pos.y = y; 748 | _previousPosition = newCount; 749 | } else { 750 | float h = 0f; 751 | for (int i = _heights.Count - 1; i >= _heights.Count - newCount; i--) { 752 | h += _heights[i] + ItemSpacing; 753 | } 754 | pos.y = height - h - _container.height; 755 | } 756 | _content.anchoredPosition = pos; 757 | float _topPosition = _content.anchoredPosition.y - ItemSpacing; 758 | float itemPosition = Mathf.Abs (_positions[_previousPosition]) + _heights[_previousPosition]; 759 | int position = (_topPosition > itemPosition) ? _previousPosition + 1 : _previousPosition - 1; 760 | if (position < 0) { 761 | _previousPosition = 0; 762 | position = 1; 763 | } 764 | for (int i = 0; i < _views.Length; i++) { 765 | int newIndex = position % _views.Length; 766 | if (newIndex < 0) { 767 | continue; 768 | } 769 | _views[newIndex].gameObject.SetActive (true); 770 | _views[newIndex].name = position.ToString (); 771 | OnFill (position, _views[newIndex]); 772 | pos = _rects[newIndex].anchoredPosition; 773 | pos.y = _positions[position]; 774 | _rects[newIndex].anchoredPosition = pos; 775 | Vector2 size = _rects[newIndex].sizeDelta; 776 | size.y = _heights[position]; 777 | _rects[newIndex].sizeDelta = size; 778 | position++; 779 | if (position == _count) { 780 | break; 781 | } 782 | } 783 | } 784 | 785 | /// 786 | /// Update list after load new items for horizontal scroller 787 | /// 788 | /// Total items count 789 | /// Added items count 790 | /// Direction to add 791 | void ApplyDataToHorizontal (int count, int newCount, Direction direction) { 792 | _count = count; 793 | if (_count <= _views.Length) { 794 | InitData (count); 795 | return; 796 | } 797 | float width = CalcSizesPositions (count); 798 | _content.sizeDelta = new Vector2 (width, _content.sizeDelta.y); 799 | Vector2 pos = _content.anchoredPosition; 800 | if (direction == Direction.Left) { 801 | float x = 0f; 802 | for (int i = 0; i < newCount; i++) { 803 | x -= _widths[i] + ItemSpacing; 804 | } 805 | pos.x = x; 806 | _previousPosition = newCount; 807 | } else { 808 | float w = 0f; 809 | for (int i = _widths.Count - 1; i >= _widths.Count - newCount; i--) { 810 | w += _widths[i] + ItemSpacing; 811 | } 812 | pos.x = -width + w + _container.width; 813 | } 814 | _content.anchoredPosition = pos; 815 | float _leftPosition = _content.anchoredPosition.x - ItemSpacing; 816 | float itemPosition = Mathf.Abs (_positions[_previousPosition]) + _widths[_previousPosition]; 817 | int position = (_leftPosition > itemPosition) ? _previousPosition + 1 : _previousPosition - 1; 818 | if (position < 0) { 819 | _previousPosition = 0; 820 | position = 1; 821 | } 822 | for (int i = 0; i < _views.Length; i++) { 823 | int newIndex = position % _views.Length; 824 | if (newIndex < 0) { 825 | continue; 826 | } 827 | _views[newIndex].gameObject.SetActive (true); 828 | _views[newIndex].name = position.ToString (); 829 | OnFill (position, _views[newIndex]); 830 | pos = _rects[newIndex].anchoredPosition; 831 | pos.x = _positions[position]; 832 | _rects[newIndex].anchoredPosition = pos; 833 | Vector2 size = _rects[newIndex].sizeDelta; 834 | size.x = _widths[position]; 835 | _rects[newIndex].sizeDelta = size; 836 | position++; 837 | if (position == _count) { 838 | break; 839 | } 840 | } 841 | } 842 | 843 | /// 844 | /// Update list after items delete 845 | /// 846 | /// Index to move from 847 | /// New height 848 | void MoveDataTo (int index, float height) { 849 | if (Type == 0) { 850 | MoveDataToVertical (index, height); 851 | } else { 852 | MoveDataToHorizontal (index, height); 853 | } 854 | } 855 | 856 | /// 857 | /// Update list after items delete for vertical scroller 858 | /// 859 | /// Index to move from 860 | /// New height 861 | void MoveDataToVertical (int index, float height) { 862 | _content.sizeDelta = new Vector2 (_content.sizeDelta.x, height); 863 | Vector2 pos = _content.anchoredPosition; 864 | for (int i = 0; i < _views.Length; i++) { 865 | int newIndex = index % _views.Length; 866 | _views[newIndex].name = index.ToString (); 867 | if (index >= _count) { 868 | _views[newIndex].gameObject.SetActive (false); 869 | continue; 870 | } else { 871 | _views[newIndex].gameObject.SetActive (true); 872 | OnFill (index, _views[newIndex]); 873 | } 874 | pos = _rects[newIndex].anchoredPosition; 875 | pos.y = _positions[index]; 876 | _rects[newIndex].anchoredPosition = pos; 877 | Vector2 size = _rects[newIndex].sizeDelta; 878 | size.y = _heights[index]; 879 | _rects[newIndex].sizeDelta = size; 880 | index++; 881 | } 882 | } 883 | 884 | /// 885 | /// Update list after items delete for horizontal scroller 886 | /// 887 | /// Index to move from 888 | /// New width 889 | void MoveDataToHorizontal (int index, float width) { 890 | _content.sizeDelta = new Vector2 (width, _content.sizeDelta.y); 891 | Vector2 pos = _content.anchoredPosition; 892 | for (int i = 0; i < _views.Length; i++) { 893 | int newIndex = index % _views.Length; 894 | _views[newIndex].name = index.ToString (); 895 | if (index >= _count) { 896 | _views[newIndex].gameObject.SetActive (false); 897 | continue; 898 | } else { 899 | _views[newIndex].gameObject.SetActive (true); 900 | OnFill (index, _views[newIndex]); 901 | } 902 | pos = _rects[newIndex].anchoredPosition; 903 | pos.x = _positions[index]; 904 | _rects[newIndex].anchoredPosition = pos; 905 | Vector2 size = _rects[newIndex].sizeDelta; 906 | size.x = _widths[index]; 907 | _rects[newIndex].sizeDelta = size; 908 | index++; 909 | } 910 | } 911 | 912 | /// 913 | /// Move scroll to side 914 | /// 915 | /// Direction to move 916 | public void MoveToSide (Direction direction) { 917 | DateTime now = DateTime.Now; 918 | if ((now - _lastMoveTime).TotalMilliseconds < UPDATE_TIME_DIFF) { 919 | return; 920 | } 921 | _lastMoveTime = now; 922 | StartCoroutine (MoveTo (direction)); 923 | } 924 | 925 | /// 926 | /// Move coroutine 927 | /// 928 | /// Direction to move 929 | IEnumerator MoveTo (Direction direction) { 930 | float speed = SCROLL_SPEED; 931 | float start = 0f; 932 | float end = 0f; 933 | float timer = 0f; 934 | if (Type == 0) { 935 | start = _scroll.verticalNormalizedPosition; 936 | end = (direction == Direction.Bottom) ? 0f : 1f; 937 | } else { 938 | start = _scroll.horizontalNormalizedPosition; 939 | end = (direction == Direction.Left) ? 0f : 1f; 940 | } 941 | while (timer <= 1f) { 942 | speed = Mathf.Lerp (speed, 0f, timer); 943 | if (Type == 0) { 944 | _scroll.verticalNormalizedPosition = Mathf.Lerp (start, end, timer); 945 | _scroll.velocity = new Vector2 (0f, (direction == Direction.Top) ? -speed : speed); 946 | } else { 947 | _scroll.horizontalNormalizedPosition = Mathf.Lerp (start, end, timer); 948 | _scroll.velocity = new Vector2 ((direction == Direction.Left) ? speed : -speed, 0f); 949 | } 950 | timer += Time.deltaTime / SCROLL_DURATION; 951 | yield return null; 952 | } 953 | if (Type == 0) { 954 | _scroll.velocity = new Vector2 (0f, (direction == Direction.Top) ? -SCROLL_SPEED : SCROLL_SPEED); 955 | } else { 956 | _scroll.velocity = new Vector2 ((direction == Direction.Left) ? SCROLL_SPEED : -SCROLL_SPEED, 0f); 957 | } 958 | } 959 | 960 | /// 961 | /// Disable all items in list 962 | /// 963 | public void RecycleAll () { 964 | _count = 0; 965 | if (_views == null) { 966 | return; 967 | } 968 | for (int i = 0; i < _views.Length; i++) { 969 | _views[i].gameObject.SetActive (false); 970 | } 971 | } 972 | 973 | /// 974 | /// Disable item 975 | /// 976 | /// Index in list data 977 | public void Recycle (int index) { 978 | _count--; 979 | string name = index.ToString (); 980 | float height = CalcSizesPositions (_count); 981 | for (int i = 0; i < _views.Length; i++) { 982 | if (string.CompareOrdinal (_views[i].name, name) == 0) { 983 | _views[i].gameObject.SetActive (false); 984 | MoveDataTo (i, height); 985 | break; 986 | } 987 | } 988 | } 989 | 990 | /// 991 | /// Update visible items with new data 992 | /// 993 | public void UpdateVisible () { 994 | bool showed = false; 995 | for (int i = 0; i < _views.Length; i++) { 996 | showed = i < _count; 997 | _views[i].gameObject.SetActive (showed); 998 | if (i + 1 > _count) { 999 | continue; 1000 | } 1001 | int index = int.Parse (_views[i].name); 1002 | OnFill (index, _views[i]); 1003 | } 1004 | } 1005 | 1006 | /// 1007 | /// Clear views cache 1008 | /// Needed to recreate views after Prefab change 1009 | /// 1010 | public void RefreshViews () { 1011 | if (_views == null) { 1012 | return; 1013 | } 1014 | for (int i = 0; i < _views.Length; i++) { 1015 | Destroy (_views[i].gameObject); 1016 | } 1017 | _rects = null; 1018 | _views = null; 1019 | CreateViews (); 1020 | } 1021 | 1022 | /// 1023 | /// Create views 1024 | /// 1025 | void CreateViews () { 1026 | if (Type == 0) { 1027 | CreateViewsVertical (); 1028 | } else { 1029 | CreateViewsHorizontal (); 1030 | } 1031 | } 1032 | 1033 | /// 1034 | /// Create view for vertical scroller 1035 | /// 1036 | void CreateViewsVertical () { 1037 | if (_views != null) { 1038 | return; 1039 | } 1040 | GameObject clone; 1041 | RectTransform rect; 1042 | int height = 0; 1043 | foreach (int item in _heights.Values) { 1044 | height += item; 1045 | } 1046 | height = height / _heights.Count; 1047 | int fillCount = Mathf.RoundToInt (_container.height / height) + 4; 1048 | _views = new GameObject[fillCount]; 1049 | for (int i = 0; i < fillCount; i++) { 1050 | clone = (GameObject) Instantiate (Prefab, Vector3.zero, Quaternion.identity); 1051 | clone.transform.SetParent (_content); 1052 | clone.transform.localScale = Vector3.one; 1053 | clone.transform.localPosition = Vector3.zero; 1054 | rect = clone.GetComponent (); 1055 | rect.pivot = new Vector2 (0.5f, 1f); 1056 | rect.anchorMin = new Vector2 (0f, 1f); 1057 | rect.anchorMax = Vector2.one; 1058 | rect.offsetMax = Vector2.zero; 1059 | rect.offsetMin = Vector2.zero; 1060 | _views[i] = clone; 1061 | } 1062 | _rects = new RectTransform[_views.Length]; 1063 | for (int i = 0; i < _views.Length; i++) { 1064 | _rects[i] = _views[i].gameObject.GetComponent (); 1065 | } 1066 | } 1067 | 1068 | /// 1069 | /// Create view for horizontal scroller 1070 | /// 1071 | void CreateViewsHorizontal () { 1072 | if (_views != null) { 1073 | return; 1074 | } 1075 | GameObject clone; 1076 | RectTransform rect; 1077 | int width = 0; 1078 | foreach (int item in _widths.Values) { 1079 | width += item; 1080 | } 1081 | width = width / _widths.Count; 1082 | int fillCount = Mathf.RoundToInt (_container.width / width) + 4; 1083 | _views = new GameObject[fillCount]; 1084 | for (int i = 0; i < fillCount; i++) { 1085 | clone = (GameObject) Instantiate (Prefab, Vector3.zero, Quaternion.identity); 1086 | clone.transform.SetParent (_content); 1087 | clone.transform.localScale = Vector3.one; 1088 | clone.transform.localPosition = Vector3.zero; 1089 | rect = clone.GetComponent (); 1090 | rect.pivot = new Vector2 (0f, 0.5f); 1091 | rect.anchorMin = Vector2.zero; 1092 | rect.anchorMax = new Vector2 (0f, 1f); 1093 | rect.offsetMax = Vector2.zero; 1094 | rect.offsetMin = Vector2.zero; 1095 | _views[i] = clone; 1096 | } 1097 | _rects = new RectTransform[_views.Length]; 1098 | for (int i = 0; i < _views.Length; i++) { 1099 | _rects[i] = _views[i].gameObject.GetComponent (); 1100 | } 1101 | } 1102 | 1103 | /// 1104 | /// Create labels 1105 | /// 1106 | void CreateLabels () { 1107 | if (Type == 0) { 1108 | CreateLabelsVertical (); 1109 | } else { 1110 | CreateLabelsHorizontal (); 1111 | } 1112 | } 1113 | 1114 | /// 1115 | /// Create labels for vertical scroller 1116 | /// 1117 | void CreateLabelsVertical () { 1118 | GameObject topText = new GameObject ("TopLabel"); 1119 | topText.transform.SetParent (_scroll.viewport.transform); 1120 | TopLabel = topText.AddComponent (); 1121 | TopLabel.font = LabelsFont; 1122 | TopLabel.fontSize = 24; 1123 | TopLabel.transform.localScale = Vector3.one; 1124 | TopLabel.alignment = TextAlignmentOptions.Center; 1125 | TopLabel.text = TopPullLabel; 1126 | RectTransform rect = TopLabel.GetComponent (); 1127 | rect.pivot = new Vector2 (0.5f, 1f); 1128 | rect.anchorMin = new Vector2 (0f, 1f); 1129 | rect.anchorMax = Vector2.one; 1130 | rect.offsetMax = Vector2.zero; 1131 | rect.offsetMin = new Vector2 (0f, -LabelOffset); 1132 | rect.anchoredPosition3D = Vector3.zero; 1133 | topText.SetActive (false); 1134 | GameObject bottomText = new GameObject ("BottomLabel"); 1135 | bottomText.transform.SetParent (_scroll.viewport.transform); 1136 | BottomLabel = bottomText.AddComponent (); 1137 | BottomLabel.font = LabelsFont; 1138 | BottomLabel.fontSize = 24; 1139 | BottomLabel.transform.localScale = Vector3.one; 1140 | BottomLabel.alignment = TextAlignmentOptions.Center; 1141 | BottomLabel.text = BottomPullLabel; 1142 | BottomLabel.transform.position = Vector3.zero; 1143 | rect = BottomLabel.GetComponent (); 1144 | rect.pivot = new Vector2 (0.5f, 0f); 1145 | rect.anchorMin = Vector2.zero; 1146 | rect.anchorMax = new Vector2 (1f, 0f); 1147 | rect.offsetMax = new Vector2 (0f, LabelOffset); 1148 | rect.offsetMin = Vector2.zero; 1149 | rect.anchoredPosition3D = Vector3.zero; 1150 | bottomText.SetActive (false); 1151 | } 1152 | 1153 | /// 1154 | /// Create labels for horizontal scroller 1155 | /// 1156 | void CreateLabelsHorizontal () { 1157 | GameObject leftText = new GameObject ("LeftLabel"); 1158 | leftText.transform.SetParent (_scroll.viewport.transform); 1159 | LeftLabel = leftText.AddComponent (); 1160 | LeftLabel.font = LabelsFont; 1161 | LeftLabel.fontSize = 24; 1162 | LeftLabel.transform.localScale = Vector3.one; 1163 | LeftLabel.alignment = TextAlignmentOptions.Center; 1164 | LeftLabel.text = LeftPullLabel; 1165 | RectTransform rect = LeftLabel.GetComponent (); 1166 | rect.pivot = new Vector2 (0f, 0.5f); 1167 | rect.anchorMin = Vector2.zero; 1168 | rect.anchorMax = new Vector2 (0f, 1f); 1169 | rect.offsetMax = Vector2.zero; 1170 | rect.offsetMin = new Vector2 (-LabelOffset * 2, 0f); 1171 | rect.anchoredPosition3D = Vector3.zero; 1172 | leftText.SetActive (false); 1173 | GameObject rightText = new GameObject ("RightLabel"); 1174 | rightText.transform.SetParent (_scroll.viewport.transform); 1175 | RightLabel = rightText.AddComponent (); 1176 | RightLabel.font = LabelsFont; 1177 | RightLabel.fontSize = 24; 1178 | RightLabel.transform.localScale = Vector3.one; 1179 | RightLabel.alignment = TextAlignmentOptions.Center; 1180 | RightLabel.text = RightPullLabel; 1181 | RightLabel.transform.position = Vector3.zero; 1182 | rect = RightLabel.GetComponent (); 1183 | rect.pivot = new Vector2 (1f, 0.5f); 1184 | rect.anchorMin = new Vector2 (1f, 0f); 1185 | rect.anchorMax = Vector3.one; 1186 | rect.offsetMax = new Vector2 (LabelOffset * 2, 0f); 1187 | rect.offsetMin = Vector2.zero; 1188 | rect.anchoredPosition3D = Vector3.zero; 1189 | rightText.SetActive (false); 1190 | } 1191 | 1192 | } 1193 | 1194 | } 1195 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/InfiniteScroll/Scripts/InfiniteScroll/InfiniteScroll.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d584a012d92e744e19fbad8784a4a909 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a97527ae3b2fcb4095c3841f1314cdc 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 627e750d72074bc4983e78d35a4840ea 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a61172e8f0dc3ed4ba823955ca1ab9e4 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIControlTemplate.txt: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using MetaFramework.UI; 6 | 7 | public class {0} : UIBase<{1}, {2}> 8 | { 9 | public override UILayer GetLayer() 10 | { 11 | return UILayer.Center; 12 | } 13 | 14 | public override void OnEnter(params object[] args) 15 | { 16 | 17 | } 18 | 19 | public override void OnExit() 20 | { 21 | 22 | } 23 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIControlTemplate.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15b6d9a96cc589641ad25471a1540433 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIModelTemplate.txt: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using MetaFramework.UI; 5 | 6 | public class {0} : IUIModel 7 | { 8 | 9 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIModelTemplate.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9b348bd1dcc94d47a0956cb82499945 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIViewAutoCreateConfig.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &11400000 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 11500000, guid: 22205bc9d868814479a10bbb708de035, type: 3} 13 | m_Name: UIViewAutoCreateConfig 14 | m_EditorClassIdentifier: 15 | uiInfoList: 16 | - propName: Ts_ 17 | comName: Transform 18 | - propName: RectTs_ 19 | comName: RectTransform 20 | - propName: Txt_ 21 | comName: Text 22 | - propName: Btn_ 23 | comName: Button 24 | - propName: Img_ 25 | comName: Image 26 | - propName: RawImg_ 27 | comName: RawImage 28 | - propName: Scroll_ 29 | comName: Mopsicus.InfiniteScroll.InfiniteScroll 30 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIViewAutoCreateConfig.asset.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b931119993bd6942b53590050c7329c 3 | NativeFormatImporter: 4 | externalObjects: {} 5 | mainObjectFileID: 11400000 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIViewTemplate.txt: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEngine.UI; 5 | using MetaFramework.UI; 6 | 7 | /// 8 | /// Auto Generate Class!!! 9 | /// 10 | public class {0} : IUIView 11 | { 12 | {1} 13 | public void Init(GameObject go) 14 | { 15 | {2} 16 | } 17 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/Template/UIViewTemplate.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6a0b7f749ff80a4f8ee7b32ef03db3e 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIAutoCreatePathSetting.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meta404Dev/MetaJUI/1362a7988176119a483a51cc0a9b0dc728666d04/UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIAutoCreatePathSetting.cs -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIAutoCreatePathSetting.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bab1158f0f9cfa469d0c1a4779d7e8b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIControlAutoCreate.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meta404Dev/MetaJUI/1362a7988176119a483a51cc0a9b0dc728666d04/UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIControlAutoCreate.cs -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIControlAutoCreate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8a1ddb651bfe60a4793eaf7b794af2a5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIModelAutoCreate.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meta404Dev/MetaJUI/1362a7988176119a483a51cc0a9b0dc728666d04/UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIModelAutoCreate.cs -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIModelAutoCreate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07b217d62485e80428db479036b96da6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIScriptAutoCreateEditorWindow.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | using UnityEditor; 5 | using System.IO; 6 | 7 | namespace XFramework.UI.Editor 8 | { 9 | public class UIScriptAutoCreateEditorWindow : EditorWindow 10 | { 11 | private string NewUIName; 12 | 13 | private GameObject uiRootGo; 14 | 15 | private static string readMeText; 16 | 17 | 18 | 19 | [MenuItem("MetaTools/UI自动生成器 #&%U", false, 999)] 20 | static void ShowEditor() 21 | { 22 | UIScriptAutoCreateEditorWindow window = GetWindow(); 23 | window.minSize = new Vector2(600, 300); 24 | window.titleContent.text = "UI自动生成器"; 25 | 26 | var readMe = AssetDatabase.LoadAssetAtPath(UIAutoCreatePathSetting.ReadMeFilePath); 27 | readMeText = readMe.text; 28 | } 29 | 30 | private void OnGUI() 31 | { 32 | #region GUIStyle 设置 33 | Color fontColor = new Color(179f / 255f, 179f / 255f, 179f / 255f, 1f); 34 | 35 | //GUIStyle gl = "Toggle"; 36 | //gl.margin = new RectOffset(0, 100, 0, 0); 37 | 38 | GUIStyle titleStyle = new GUIStyle() { fontSize = 18, alignment = TextAnchor.MiddleCenter }; 39 | titleStyle.normal.textColor = fontColor; 40 | 41 | GUIStyle sonTittleStyle = new GUIStyle() { fontSize = 15, alignment = TextAnchor.MiddleCenter }; 42 | sonTittleStyle.normal.textColor = fontColor; 43 | 44 | GUIStyle leftStyle = new GUIStyle() { fontSize = 15, alignment = TextAnchor.MiddleLeft }; 45 | leftStyle.normal.textColor = fontColor; 46 | 47 | GUIStyle littoleStyle = new GUIStyle() { fontSize = 13, alignment = TextAnchor.MiddleCenter }; 48 | littoleStyle.normal.textColor = fontColor; 49 | #endregion 50 | 51 | GUILayout.BeginArea(new Rect(0, 0, 600, 1200)); 52 | GUILayout.BeginVertical(); 53 | 54 | GUILayout.BeginHorizontal(); 55 | EditorGUILayout.TextArea(readMeText, leftStyle, GUILayout.Width(600)); 56 | GUILayout.EndHorizontal(); 57 | 58 | 59 | GUILayout.Space(50); 60 | GUILayout.BeginHorizontal(); 61 | EditorGUILayout.LabelField("预制体自动生成设置", titleStyle, GUILayout.Width(600)); 62 | GUILayout.EndHorizontal(); 63 | 64 | GUILayout.BeginHorizontal(); 65 | EditorGUILayout.LabelField("新UI的名字", leftStyle, GUILayout.Width(150)); 66 | NewUIName = EditorGUILayout.TextField(NewUIName, GUILayout.Width(350)); 67 | GUILayout.EndHorizontal(); 68 | 69 | GUILayout.BeginHorizontal(); 70 | if (GUILayout.Button("生成UI预制体", GUILayout.Width(600), GUILayout.Height(30))) 71 | { 72 | CreateUIPrefab(); 73 | } 74 | GUILayout.EndHorizontal(); 75 | 76 | 77 | 78 | GUILayout.Space(50); 79 | GUILayout.BeginHorizontal(); 80 | EditorGUILayout.LabelField("代码自动生成设置", titleStyle, GUILayout.Width(600)); 81 | GUILayout.EndHorizontal(); 82 | 83 | GUILayout.BeginHorizontal(); 84 | EditorGUILayout.LabelField("View根节点:", leftStyle, GUILayout.Width(150)); 85 | uiRootGo = (GameObject)EditorGUILayout.ObjectField(uiRootGo, typeof(GameObject), true); 86 | GUILayout.EndHorizontal(); 87 | 88 | GUILayout.BeginHorizontal(); 89 | if (GUILayout.Button("生成View代码", GUILayout.Width(600), GUILayout.Height(30))) 90 | { 91 | CreateUIView(); 92 | } 93 | GUILayout.EndHorizontal(); 94 | 95 | GUILayout.BeginHorizontal(); 96 | if (GUILayout.Button("生成MVC代码", GUILayout.Width(600), GUILayout.Height(30))) 97 | { 98 | CreateMVC(); 99 | } 100 | GUILayout.EndHorizontal(); 101 | 102 | GUILayout.EndVertical(); 103 | GUILayout.EndArea(); 104 | } 105 | 106 | private void CreateUIPrefab() 107 | { 108 | if (string.IsNullOrEmpty(NewUIName)) throw new System.Exception("请输入UI名字"); 109 | 110 | string newPrefabPath = UIAutoCreatePathSetting.PrefabTemplatePath.Replace("UITemplate", NewUIName); 111 | 112 | //copy prefab 113 | string strPrefab = ".prefab"; 114 | string originPrefabFullPath = Application.dataPath + UIAutoCreatePathSetting.PrefabTemplatePath + strPrefab; 115 | string newPrefabFullPath = Application.dataPath + newPrefabPath + strPrefab; 116 | originPrefabFullPath = originPrefabFullPath.Replace("/AssetsAssets", "/Assets"); 117 | newPrefabFullPath = newPrefabFullPath.Replace("/AssetsAssets", "/Assets"); 118 | 119 | //copy meta 120 | string strMeta = ".meta"; 121 | string originMetaFullPath = originPrefabFullPath + strMeta; 122 | string newMetaFullPath = newPrefabFullPath + strMeta; 123 | 124 | bool result = false; 125 | if (File.Exists(newPrefabFullPath)) 126 | { 127 | if (EditorUtility.DisplayDialog("警告", "检测到UI预制体,是否覆盖", "确定", "取消")) 128 | { 129 | File.Copy(originPrefabFullPath, newPrefabFullPath, true); 130 | File.Copy(originMetaFullPath, newMetaFullPath, true); 131 | result = true; 132 | } 133 | } 134 | else 135 | { 136 | File.Copy(originPrefabFullPath, newPrefabFullPath); 137 | File.Copy(originMetaFullPath, newMetaFullPath); 138 | result = true; 139 | } 140 | 141 | if (result) 142 | { 143 | Debug.Log("UI创建成功: " + newPrefabPath); 144 | AssetDatabase.Refresh(); 145 | 146 | string newUIFullPath = newPrefabPath + strPrefab; 147 | uiRootGo = AssetDatabase.LoadAssetAtPath(newUIFullPath); 148 | } 149 | } 150 | 151 | private void CreateMVC() 152 | { 153 | CreateUIView(); 154 | CreateUIModel(); 155 | CreateUIControl(); 156 | } 157 | private void CreateUIView() 158 | { 159 | if (uiRootGo == null) throw new System.Exception("请拖入需要生成的UI预制体"); 160 | 161 | string uiName = GetUIName(); 162 | string tempPath = UIAutoCreatePathSetting.TemplateFilePath + UIAutoCreatePathSetting.ViewTemplateName; 163 | string targetPath = GetTargetGeneratePath(uiName); 164 | CheckTargetPath(targetPath); 165 | new UIViewAutoCreate().Create(uiName, uiRootGo, tempPath, targetPath); 166 | } 167 | private void CreateUIControl() 168 | { 169 | if (uiRootGo == null) throw new System.Exception("请拖入需要生成的UI预制体"); 170 | 171 | string uiName = GetUIName(); 172 | string tempPath = UIAutoCreatePathSetting.TemplateFilePath + UIAutoCreatePathSetting.ControlTemplateName; 173 | string targetPath = GetTargetGeneratePath(uiName); 174 | CheckTargetPath(targetPath); 175 | new UIControlAutoCreate().Create(uiName, tempPath, targetPath); 176 | } 177 | private void CreateUIModel() 178 | { 179 | if (uiRootGo == null) throw new System.Exception("请拖入需要生成的UI预制体"); 180 | 181 | string uiName = GetUIName(); 182 | string tempPath = UIAutoCreatePathSetting.TemplateFilePath + UIAutoCreatePathSetting.ModelTemplateName; 183 | string targetPath = GetTargetGeneratePath(uiName); 184 | CheckTargetPath(targetPath); 185 | new UIModelAutoCreate().Create(uiName, tempPath, targetPath); 186 | } 187 | 188 | private string GetTargetGeneratePath(string uiName) 189 | { 190 | return UIAutoCreatePathSetting.GetUIGenerateCSFilePath() + "UI" + uiName + "/"; 191 | } 192 | 193 | private void CheckTargetPath(string targetPath) 194 | { 195 | if (!Directory.Exists(targetPath)) 196 | { 197 | Directory.CreateDirectory(targetPath); 198 | } 199 | } 200 | 201 | private string GetUIName() 202 | { 203 | string uiName = uiRootGo.name.Replace("UI", ""); 204 | return uiName; 205 | } 206 | } 207 | } -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIScriptAutoCreateEditorWindow.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1be138bcaf893834ca71def3b8cafef7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIViewAutoCreate.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meta404Dev/MetaJUI/1362a7988176119a483a51cc0a9b0dc728666d04/UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIViewAutoCreate.cs -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIViewAutoCreate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a6c075024db0ca478f4652976b5dfcd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIViewAutoCreateConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace XFramework.UI.Editor 7 | { 8 | [Serializable] 9 | public class UIViewAutoCreateInfo 10 | { 11 | /// 12 | /// 属性名 13 | /// 14 | public string propName; 15 | 16 | /// 17 | /// 组件名 18 | /// 19 | public string comName; 20 | } 21 | [Serializable, CreateAssetMenu(menuName = "UI/CreateUIViewAutoCreateConfig")] 22 | public class UIViewAutoCreateConfig : ScriptableObject 23 | { 24 | public List uiInfoList; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/UIViewAutoCreateConfig.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22205bc9d868814479a10bbb708de035 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/readme.txt: -------------------------------------------------------------------------------- 1 | 注意事项: 2 | * 新UI的名字需要以UI作为前缀,以保证自动生成的脚本唯一性,例如: UITest 3 | * UI组件命名规范请查看 UIViewAutoCreateConfig 文件 4 | 5 | by 404meta 6 | QQ: 463056265 -------------------------------------------------------------------------------- /UnityProject/Assets/3rd/MetaJUI/Editor/UIAutoCreate/readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb1003e5efa104f4ba0bbbea93dbc121 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/Assets/HotUpdateResources/UI/UITemplate.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1 &649916415509570329 4 | GameObject: 5 | m_ObjectHideFlags: 0 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | serializedVersion: 6 10 | m_Component: 11 | - component: {fileID: 7048208909815575821} 12 | - component: {fileID: 4204937852739104907} 13 | - component: {fileID: 2597822502442511580} 14 | m_Layer: 5 15 | m_Name: Img_Bg 16 | m_TagString: Untagged 17 | m_Icon: {fileID: 0} 18 | m_NavMeshLayer: 0 19 | m_StaticEditorFlags: 0 20 | m_IsActive: 1 21 | --- !u!224 &7048208909815575821 22 | RectTransform: 23 | m_ObjectHideFlags: 0 24 | m_CorrespondingSourceObject: {fileID: 0} 25 | m_PrefabInstance: {fileID: 0} 26 | m_PrefabAsset: {fileID: 0} 27 | m_GameObject: {fileID: 649916415509570329} 28 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 29 | m_LocalPosition: {x: 0, y: 0, z: 0} 30 | m_LocalScale: {x: 1, y: 1, z: 1} 31 | m_ConstrainProportionsScale: 0 32 | m_Children: [] 33 | m_Father: {fileID: 4241364959366530145} 34 | m_RootOrder: 0 35 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 36 | m_AnchorMin: {x: 0, y: 0} 37 | m_AnchorMax: {x: 1, y: 1} 38 | m_AnchoredPosition: {x: 0, y: 0} 39 | m_SizeDelta: {x: 0, y: 0} 40 | m_Pivot: {x: 0.5, y: 0.5} 41 | --- !u!222 &4204937852739104907 42 | CanvasRenderer: 43 | m_ObjectHideFlags: 0 44 | m_CorrespondingSourceObject: {fileID: 0} 45 | m_PrefabInstance: {fileID: 0} 46 | m_PrefabAsset: {fileID: 0} 47 | m_GameObject: {fileID: 649916415509570329} 48 | m_CullTransparentMesh: 1 49 | --- !u!114 &2597822502442511580 50 | MonoBehaviour: 51 | m_ObjectHideFlags: 0 52 | m_CorrespondingSourceObject: {fileID: 0} 53 | m_PrefabInstance: {fileID: 0} 54 | m_PrefabAsset: {fileID: 0} 55 | m_GameObject: {fileID: 649916415509570329} 56 | m_Enabled: 1 57 | m_EditorHideFlags: 0 58 | m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} 59 | m_Name: 60 | m_EditorClassIdentifier: 61 | m_Material: {fileID: 0} 62 | m_Color: {r: 0, g: 0, b: 0, a: 1} 63 | m_RaycastTarget: 1 64 | m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} 65 | m_Maskable: 1 66 | m_OnCullStateChanged: 67 | m_PersistentCalls: 68 | m_Calls: [] 69 | m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0} 70 | m_Type: 1 71 | m_PreserveAspect: 0 72 | m_FillCenter: 1 73 | m_FillMethod: 4 74 | m_FillAmount: 1 75 | m_FillClockwise: 1 76 | m_FillOrigin: 0 77 | m_UseSpriteMesh: 0 78 | m_PixelsPerUnitMultiplier: 1 79 | --- !u!1 &4241364959366530146 80 | GameObject: 81 | m_ObjectHideFlags: 0 82 | m_CorrespondingSourceObject: {fileID: 0} 83 | m_PrefabInstance: {fileID: 0} 84 | m_PrefabAsset: {fileID: 0} 85 | serializedVersion: 6 86 | m_Component: 87 | - component: {fileID: 4241364959366530145} 88 | - component: {fileID: 4241364959366530159} 89 | m_Layer: 5 90 | m_Name: UITemplate 91 | m_TagString: Untagged 92 | m_Icon: {fileID: 0} 93 | m_NavMeshLayer: 0 94 | m_StaticEditorFlags: 0 95 | m_IsActive: 1 96 | --- !u!224 &4241364959366530145 97 | RectTransform: 98 | m_ObjectHideFlags: 0 99 | m_CorrespondingSourceObject: {fileID: 0} 100 | m_PrefabInstance: {fileID: 0} 101 | m_PrefabAsset: {fileID: 0} 102 | m_GameObject: {fileID: 4241364959366530146} 103 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 104 | m_LocalPosition: {x: 0, y: 0, z: 0} 105 | m_LocalScale: {x: 1, y: 1, z: 1} 106 | m_ConstrainProportionsScale: 0 107 | m_Children: 108 | - {fileID: 7048208909815575821} 109 | m_Father: {fileID: 0} 110 | m_RootOrder: 0 111 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 112 | m_AnchorMin: {x: 0, y: 0} 113 | m_AnchorMax: {x: 1, y: 1} 114 | m_AnchoredPosition: {x: 0, y: 0} 115 | m_SizeDelta: {x: 0, y: 0} 116 | m_Pivot: {x: 0.5, y: 0.5} 117 | --- !u!222 &4241364959366530159 118 | CanvasRenderer: 119 | m_ObjectHideFlags: 0 120 | m_CorrespondingSourceObject: {fileID: 0} 121 | m_PrefabInstance: {fileID: 0} 122 | m_PrefabAsset: {fileID: 0} 123 | m_GameObject: {fileID: 4241364959366530146} 124 | m_CullTransparentMesh: 0 125 | -------------------------------------------------------------------------------- /UnityProject/Assets/HotUpdateResources/UI/UITemplate.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 30098e369d7543943975b906aef70089 3 | PrefabImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: resources_widgets_uiloading 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/Singleton/MonoSingletonTemplate.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace MetaFramework.Singleton 4 | { 5 | public abstract class MonoSingletonTemplate : MonoBehaviour where T : MonoBehaviour 6 | { 7 | private static T m_instance; 8 | public static T Instance 9 | { 10 | get 11 | { 12 | return m_instance; 13 | } 14 | } 15 | 16 | 17 | protected virtual void Awake() 18 | { 19 | m_instance = this as T; 20 | } 21 | 22 | protected virtual void OnDestroy() 23 | { 24 | m_instance = null; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/Singleton/SingletonTemplate.cs: -------------------------------------------------------------------------------- 1 | namespace MetaFramework.Singleton 2 | { 3 | public abstract class SingletonTemplate where T : class, new() 4 | { 5 | private static T _instance; 6 | private static readonly object syslock = new object(); 7 | 8 | public static T Instance 9 | { 10 | get 11 | { 12 | if (_instance == null) 13 | { 14 | lock (syslock) 15 | { 16 | if (_instance == null) 17 | { 18 | _instance = new T(); 19 | } 20 | } 21 | } 22 | return _instance; 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/BindingData.cs: -------------------------------------------------------------------------------- 1 | namespace MetaFramework.UI 2 | { 3 | public class BindingData 4 | { 5 | public delegate void ValueChangeHandler(T oldValue, T newValue); 6 | public event ValueChangeHandler ValueChange; 7 | 8 | private T _value = default; 9 | public T Value 10 | { 11 | get 12 | { 13 | return _value; 14 | } 15 | set 16 | { 17 | if (!Equals(_value, value)) 18 | { 19 | T old = _value; 20 | _value = value; 21 | OnValueChange(old, _value); 22 | } 23 | } 24 | } 25 | 26 | public BindingData(T value) 27 | { 28 | Value = value; 29 | } 30 | 31 | public void OnValueChange(T oldValue, T newValue) 32 | { 33 | ValueChange?.Invoke(oldValue, newValue); 34 | } 35 | 36 | public static implicit operator T(BindingData value) 37 | { 38 | return value.Value; 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/Interface/IUIBase.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using UnityEngine; 3 | 4 | namespace MetaFramework.UI 5 | { 6 | public interface IUIBase 7 | { 8 | string uiName { get; set; } 9 | GameObject uiGo { get; set; } 10 | IUIModel uiModel { get; set; } 11 | IUIView uiView { get; set; } 12 | 13 | UILayer GetLayer(); 14 | 15 | void OnEnter(params object[] args); 16 | 17 | void OnPause(); 18 | 19 | void OnResume(); 20 | 21 | void OnExit(); 22 | 23 | void OnUpdate(); 24 | 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/Interface/IUIModel.cs: -------------------------------------------------------------------------------- 1 | namespace MetaFramework.UI 2 | { 3 | public interface IUIModel 4 | { 5 | 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/Interface/IUIView.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace MetaFramework.UI 4 | { 5 | public interface IUIView 6 | { 7 | void Init(GameObject go); 8 | } 9 | } -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/RedPoint/RedPointNode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace MetaFramework.UI 7 | { 8 | public class RedPointNode 9 | { 10 | /// 11 | /// 节点名称 12 | /// 13 | public string nodeName; 14 | 15 | /// 16 | /// 总的红点数量 17 | /// 18 | public int pointCount = 0; 19 | 20 | /// 21 | /// 父节点 22 | /// 23 | public RedPointNode parent = null; 24 | 25 | /// 26 | /// 数量变化回调 27 | /// 28 | public Action onChangeCount; 29 | 30 | /// 31 | /// 子节点字典 32 | /// 33 | public Dictionary dicChilds = new Dictionary(); 34 | 35 | public RedPointNode(string nodeName) 36 | { 37 | this.nodeName = nodeName; 38 | } 39 | 40 | /// 41 | /// 添加子节点 42 | /// 43 | /// 44 | /// 45 | public RedPointNode AddChildNode(string nodeName) 46 | { 47 | RedPointNode childNode = new RedPointNode(nodeName); 48 | childNode.parent = this; 49 | 50 | dicChilds.Add(nodeName, childNode); 51 | 52 | return childNode; 53 | } 54 | 55 | /// 56 | /// 设置当前节点的红点数量 57 | /// 58 | /// 59 | public void SetRedPointCount(int newCount) 60 | { 61 | //红点数量只能设置叶子节点 62 | if (dicChilds.Count > 0) 63 | { 64 | Debug.LogError("Only Can Set Leaf Node!"); 65 | return; 66 | } 67 | 68 | pointCount = newCount; 69 | 70 | NotifyPointCountChange(); 71 | } 72 | 73 | /// 74 | /// 计算当前红点数量 75 | /// 76 | private void ChangeRedPointCount() 77 | { 78 | int count = 0; 79 | foreach (var node in dicChilds.Values) 80 | { 81 | count += node.pointCount; 82 | } 83 | 84 | //红点有变化 85 | if (count != pointCount) 86 | { 87 | pointCount = count; 88 | NotifyPointCountChange(); 89 | } 90 | } 91 | 92 | /// 93 | /// 通知红点数量变化 94 | /// 95 | private void NotifyPointCountChange() 96 | { 97 | onChangeCount?.Invoke(this); 98 | 99 | if (parent != null) 100 | { 101 | parent.ChangeRedPointCount(); 102 | } 103 | } 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/RedPoint/RedPointSystems.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | namespace MetaFramework.UI 7 | { 8 | public class RedPointSystems 9 | { 10 | /// 11 | /// 红点树Root节点 12 | /// 13 | private RedPointNode rootNode; 14 | 15 | /// 16 | /// 示例 17 | /// 18 | public void Example() 19 | { 20 | RedPointNode mainNode = new RedPointNode("Main"); 21 | 22 | var mailNode = mainNode.AddChildNode("Mail"); 23 | var taskNode = mainNode.AddChildNode("Task"); 24 | var bagNode = mainNode.AddChildNode("Bag"); 25 | 26 | mailNode.AddChildNode("Mail1"); 27 | mailNode.AddChildNode("Mail2"); 28 | mailNode.AddChildNode("Mail3"); 29 | } 30 | 31 | /// 32 | /// 初始化红点树 33 | /// 34 | public void Init(RedPointNode rootNode) 35 | { 36 | this.rootNode = rootNode; 37 | } 38 | 39 | /// 40 | /// 注册红点改变事件 41 | /// 42 | /// 43 | /// 44 | public void Register(string nodeName, Action callBack) 45 | { 46 | var node = FindNode(nodeName); 47 | if (node == null) 48 | { 49 | Debug.LogError("register failed! can not find the node:" + nodeName); 50 | return; 51 | } 52 | 53 | node.onChangeCount = callBack; 54 | } 55 | 56 | /// 57 | /// 派发事件 58 | /// 59 | /// 60 | /// 61 | public void Dispatch(string nodeName, int newCount) 62 | { 63 | var node = FindNode(nodeName); 64 | if (node == null) 65 | { 66 | Debug.LogError("register failed! can not find the node:" + nodeName); 67 | return; 68 | } 69 | 70 | node.SetRedPointCount(newCount); 71 | } 72 | 73 | private RedPointNode FindNode(string findNodeName) 74 | { 75 | return FindNode(rootNode, findNodeName); 76 | } 77 | 78 | private RedPointNode FindNode(RedPointNode node, string findNodeName) 79 | { 80 | foreach (var childNode in node.dicChilds) 81 | { 82 | if (childNode.Key.Equals(findNodeName)) return childNode.Value; 83 | 84 | var findResult = FindNode(childNode.Value, findNodeName); 85 | if (findResult != null) return findResult; 86 | } 87 | 88 | return null; 89 | } 90 | 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/UIBase.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meta404Dev/MetaJUI/1362a7988176119a483a51cc0a9b0dc728666d04/UnityProject/HotUpdateScripts/MetaFramework/UI/UIBase.cs -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/UILayer.cs: -------------------------------------------------------------------------------- 1 | namespace MetaFramework.UI 2 | { 3 | public enum UILayer 4 | { 5 | Center, 6 | Top, 7 | Guide, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/UIManager.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meta404Dev/MetaJUI/1362a7988176119a483a51cc0a9b0dc728666d04/UnityProject/HotUpdateScripts/MetaFramework/UI/UIManager.cs -------------------------------------------------------------------------------- /UnityProject/HotUpdateScripts/MetaFramework/UI/UITool.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Meta404Dev/MetaJUI/1362a7988176119a483a51cc0a9b0dc728666d04/UnityProject/HotUpdateScripts/MetaFramework/UI/UITool.cs --------------------------------------------------------------------------------