chiuan / ttuiframework Goto Github PK
View Code? Open in Web Editor NEWUI Framework For Unity3D Support Async and Sync UI
UI Framework For Unity3D Support Async and Sync UI
多谢分享经验!!
例子和源码粗略看了一下,好像只有隐藏。
大神,我看了一下你的TTUIPage的整体结构,感觉十分的清晰,所以将你的框架用到了我们的项目中,目前UI的进展还是很顺利的,你的UIBinder中的异步加载绑定那个是不是还没开始写啊~能够留下联系方式,多多交流~~
UI的prefab资源应该在什么时候释放呢?
是应该在hide吗
如果ScrollView里的cell很少不满一页的话,ScrollView里Content的PosY值会不停变化,导致界面抖动。
在你提供的Demo里面,做这样的改动就会出现这个问题,虽然抖动的幅度不大,但是仔细看还是能看出来,不知有没有什么好的解决办法?(ps:我只是把 i < 10,改成了 i<3)
for(int i=0; i < 3; i++)
{
UDSkill.Skill skill = new UDSkill.Skill();
skill.name = "skill_" + i;
skill.level = 1;
skill.desc = "这是个牛逼的技能";
playerSkill.skills.Add(skill);
}
Hi,
I found this framework is awesome!
Could you please add some function so the transition between page will be easier. For example, we will have OnPageAnimationStart, OnPageAnimation, OnPageAnimationFinished for both In and Out process?
That way we can have smooth page switch effect.
Thank so much!
您好!看了您的框架受益匪浅,现在的例子里有type是normal、mode是hideother的类型,其它的类型希望也可以有例子,谢谢!
当我重写TTUIPage.Hide() ,想延时再隐藏
原文是
public virtual void Hide()
{
this.gameObject.SetActive(false);
isActived = false;
//set this page's data null when hide.
this.m_data = null;
}
重写之后是
public override void Hide()
{
Tweener doFade = this.gameObject.GetComponent<CanvasGroup>().DOFade(0, 0.5f);
doFade.onComplete += () => this.gameObject.SetActive(false);
isActived = false;
//set this page's data null when hide.
this.m_data = null;
}
问题在于
this.m_data
是private,此处报错。是否应该将其设置为protected 。
已经具有一个protected的封装成员 protected object data { get { return m_data; } }
,但是它并没有set访问器
以为我需要延时隐藏,所以不能直接调用base.Hide()
。因为里面有gameObject.SetActive(false);
是否应该将 gameObject.SetActive(false)
与 this.m_data = null;
分成2个方法来调用
which situation can use this enum ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.