iamyaojie / ercarousel Goto Github PK
View Code? Open in Web Editor NEW轮播器,无限循环,点击回调事件,自动播放。
轮播器,无限循环,点击回调事件,自动播放。
iOS端内部嵌入了两款AR的游戏,进入不同的场景使用 UnitySendMessage("Controller", "OpenSence",data);传递不同的参数,但是只有第一次启动他才能进入其中一个,当进入第二个发送新的消息时还是会显示第一个的游戏画面,iOS端Unity是无法关闭的,后来测试加入 UnityLoadApplication();
Profiler_InitProfiler();
切换偶尔是正常的,但有时候会显示错乱,麻烦看下
(void)showUnityWindow {
if (_didResignActive) {
UnityPause(false);
}
_didResignActive = NO;
UnityLoadApplication();
Profiler_InitProfiler();
self.window.hidden =YES;
self.unityWindow.hidden = NO;
[self.unityWindow makeKeyWindow];
}
(void)hideUnityWindow {
UnityPause(true);
_didResignActive = YES;
Profiler_UninitProfiler();
self.unityWindow.hidden = YES;
self.window.hidden = NO;
[self.window makeKeyWindow];
}
发送消息代码:
(void)wjBtnDidClicked {
[kAppDelegate showUnityWindow];
[self toUnityPageWithValue:@"wj"];
}
(void)scenesBtnDidClicked {
[kAppDelegate showUnityWindow];
[self toUnityPageWithValue:@"scenes"];
}
#pragma mark - 跳转到对应的Unity页面
(void)toUnityPageWithValue:(NSString *)value {
// TODO: 新增代码
//报错SendMessage: object Controller does not have receiver for function openSence! 说明UnitySendMessage传递的对象不具备相应的方法
const char *data = [value UTF8String];
/**
你那边需要打开场景的话 需要 传值给 OpenSence这个函数 通过ios给unity对象传值的方式 值有两个 "wj" 和 ”scenes“
"Controller" "openSence" "wj 或者 scenes"
*/
UnitySendMessage("Controller", "OpenSence",data);
}
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.