Giter VIP home page Giter VIP logo

Comments (17)

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024 1

When you build an AssetsBundle on a PC platform, the Bundle you typed is not available on Android

You need to switch to the Android platform to package

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

Hello, I made a Demo project, it should be able to help you,
ApplicationManager -> First Status -> DemoStatus

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi @GaoKaiHaHa !
Awesome! I really appreciate your demo.
Could you please write some note for what Panel, GUI should be in GameUI, what should set as Fixed, Normal, PopUp and TopBar (I can understand PopUp and TopBar but for GameUI, Fixed, Normal, I need an example note)

And In MainWindow or ShopWindow, I see Object List, Bg Mask and UI Root, I just think maybe they made by automatic or some way? Do we need drag and drop them with the mouse?

And If I try to make New UI Prefab like MainWindow (By clone it),
I think I need to register in some way because I got the error when calling:
OpenUI();

System.Exception: RecourcesConfigManager GetBundleConfig : Dont find ->MainWindow1<- please check BundleConfig!

I try to look at Window menu but sorry it is china language so I can not find where to action.

If would be great if you can have small video or quick note step by step how to make UI prefab.

Thank again, you make big work for me, I am very happy when seeing Demo work!

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi! I can now answer myself how to update BundleConfig by press the first button to refresh UI folder and press the second button to recreate BundleConfig.

Now can you write simple note step by step to create UI Prefab and basic about the rule to follow?
(Folder to put it in, BG and root, Object List ...)

Thank so much!

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

hi
I am sorry to respond to you so late.
At your request

I am currently working on a wiki for this project. At present, I have completed some of the documents you requested and I will make up as soon as possible.

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi!
No problem! I am waiting for wiki about "UI system" now.Keep up the good work!

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

Hi!
I improved the UI system documentation, what else do you want to know can ask me.

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi @GaoKaiHaHa !
Awesome! I follow your new wiki and now I can create a window and show it using API call.
Now in other windows (for example MainWindow) I see some button in root game object, so I create the same but I do not know how to register or auto adds to Object List? Can it was done using the tool or we must manually add to the list?
Thank so much!

P/S: It would be great if you can list all china label into excel or text file, then we can google translate and then can understand a bit.

By the way, your wiki is awesome!!!

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

hi!
I will gradually translate the names of some of the labels into English and then make a selection button to allow the user to switch languages.

If you create a button, you need to make sure the name of the button is different from the names of the other UI in your UIWindow, and then drag it to the UIWindow's ObjectList.Then you can use it in UIWindow using the AddOnClickListener or GetButton methods.

UIWindow API I will fill in the wiki.

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi!
Thank so much @GaoKaiHaHa !
If I check use assets bundle on ApplicationManger game object, when I run game, it throws the error as below. How can I try to use assets bundle feature?

Unable to open archive file: /Users/imac/Downloads/MyUnityFrameWork-master 4/Assets/StreamingAssets/ResourcesManifest.assetBundle
UnityEngine.AssetBundle:LoadFromFile(String)
ResourcesConfigManager:ReadResourceConfigContent() (at Assets/Script/Core/ResourceLoad/ResourcesConfigManager.cs:109)
ResourcesConfigManager:GetResourcesConfig() (at Assets/Script/Core/ResourceLoad/ResourcesConfigManager.cs:72)
ResourcesConfigManager:Initialize() (at Assets/Script/Core/ResourceLoad/ResourcesConfigManager.cs:17)
ApplicationManager:AppLaunch() (at Assets/Script/Core/Application/ApplicationManager.cs:70)
ApplicationManager:Awake() (at Assets/Script/Core/Application/ApplicationManager.cs:60)

NullReferenceException: Object reference not set to an instance of an object
ResourcesConfigManager.ReadResourceConfigContent () (at Assets/Script/Core/ResourceLoad/ResourcesConfigManager.cs:113)
ResourcesConfigManager.GetResourcesConfig () (at Assets/Script/Core/ResourceLoad/ResourcesConfigManager.cs:72)
ResourcesConfigManager.Initialize () (at Assets/Script/Core/ResourceLoad/ResourcesConfigManager.cs:17)
ApplicationManager.AppLaunch () (at Assets/Script/Core/Application/ApplicationManager.cs:70)
ApplicationManager.Awake () (at Assets/Script/Core/Application/ApplicationManager.cs:60)

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

If you want to use AssetsBundle, you need to first package your assets into AssetsBundle

the specific method is in Window->打包设置编辑器 (package settings editor) ->自动添加Resource目录下的资源并保存 (automatically add resources under the Resource directory and save) ->打包 (package)

After you update your resources, remember to re-package your AssetsBundle, If you think the whole package time is too long, you can individually package a resource

I recommend using Resource mode during development and AssetsBundle mode at release time

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Thank so much! Follow your help, I just press 打包 (package) and it was done!
If check Use AssetBundle, should we delete Resources folder when build game?
For the simple and small game, can you suggest what method we should use? Check or uncheck Assets bundle? What is the main difference when check or uncheck that option?

Thank so much, I just a newbie in unity and your Framework helps me much!

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

Yes, if we use AssetsBundle mode, after the package is complete, we should delete the Resources folder, I recommend the use of the renamed method, Change Resources to _Resources,

The main difference between these two methods is that one can hot Update the resources, and the other can not, the application of the startup speed and loading speed are also different

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

I can use Assets Bundle option, change Resources to_Resources, and it works well on the editor with platform switch to Android.
But when I build apk and run on real device, Game only load to main and do not show MainWindow
(Only transparent skybox in 3D)
Can you take a look at that?
Thank so much!

from myunityframework.

GaoKaiHaHa avatar GaoKaiHaHa commented on August 19, 2024

That may be an error, you left and right hand while pressing the 6 fingers on the screen, check the console output

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

Hi @GaoKaiHaHa
It is my error when building with Use Assets Bundle option. Maybe i press to many button on pakage setting editor gui. When download project from github and press only (pakage) button, every thing ok!
Thank so much!

from myunityframework.

takaaptech avatar takaaptech commented on August 19, 2024

I just found why sometimes app run and sometimes I cannot run on the device if I check use assets bundle.
Because I create asset bundle for other build target and then switch to Android to build apk.
On Editor works fine so it seems not an error.
Just post here if someone got this error. Thank so much!

12-04 09:37:55.506 13485-13510/? E/Unity: The file can not be loaded because it was created for another build target that is not compatible with this platform.
Please make sure to build AssetBundles using the build target platform that it is used by.
File's Build target is: 5

                                      (Filename:  Line: 1093)

12-04 09:37:55.506 13485-13510/? E/Unity: The AssetBundle 'ResourcesManifest.assetBundle' can't be loaded because it was not built with the right version or build target.

                                      (Filename:  Line: 437)

12-04 09:37:55.602 13485-13510/? E/Unity: NullReferenceException: Object reference not set to an instance of an object
at ResourcesConfigManager.ReadResourceConfigContent () [0x00000] in :0
at ResourcesConfigManager.GetResourcesConfig () [0x00000] in :0
at ResourcesConfigManager.Initialize () [0x00000] in :0
at ApplicationManager.AppLaunch () [0x00000] in :0
at ApplicationManager.Awake () [0x00000] in :0

                                      (Filename:  Line: -1)

from myunityframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.