unity

Jabber.net on Unity/Android error (No JNI_OnLoad found in /system/lib/libc.so, skipping init)

匿名 (未验证) 提交于 2019-12-03 08:28:06
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a Jabber (Jabber.net) chat client using Unity3D(Mono/C#) for iOS and Android. I got the client working in iOS (also runs well in Unity simulator). However, when running it on a Nexus 7 or HTC Desire it does not work. It does not crash, but does not connect either. It just produces the following error: D/dalvikvm(9368): No JNI_OnLoad found in /system/lib/libc.so 0x413b7270, skipping init This error is connected to the Connect method of my Jabber.net client: jc = new JabberClient(); ... // Setting up the jabberclient and

unity 之 自定义弹出框

你离开我真会死。 提交于 2019-12-03 08:19:32
一、弹出 框的搭建: 布局如图: Message 为整个父物体,并且添加 UiMessage 代码。 panel 为遮罩。 MessageBox 为整个提示框, Panel 为标题, ok 为确定按钮, cancel 为取消按钮, retry 为重试按钮, Text 为提示框的文字。 注意大小写,后面代码会根据名称进行获取对应组建。 效果如下: 二、 MessageBox 代码: 要说明的都在代码中注释了。 仿照Windows的提示框功能,如果功能不足可自行添加。例如关闭按钮、显示图标等。 using System; public enum DialogResult { Ok, OKCancel, RetryCancel, YesNo, YesNoCancel } public static class MessageBox { /// <summary> /// true表示模态框 /// </summary> public static bool type; //三个委托,分别为三个按钮的点击运行事件 public static Action clickOk; public static Action clickRetry; public static Action clickCancel; public static DialogResult dialogResult; /

Exporting and running Unity3D project to Android Studio

匿名 (未验证) 提交于 2019-12-03 07:50:05
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to get logs from Unity Application when its running on Android phone. For this I have to export Android project from Unity3D and run it using Android Studio. I am doing following steps: Export Project from Unity3D by selecting Google Android Project options from player settings. Open Android Studio and Import the autogenerated project from location drive. Select Build -> Make Project. Select Run -> Run 'ModuleName'. I am getting following errors in Gradle console: FAILURE: Build failed with an exception. What went wrong: Execution

MVC Integration tests with Unity IoC

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Am trying Unity IoC, after using constructor based DI. Problem is trying to get integration tests working. http://patrick.lioi.net/2013/06/20/streamlined-integration-tests/ "Running your integration tests should exercise as much of the real system as is reasonably possible" Patrick above describes setting up an IoC inside the MVC Unit test project.. but I'm stuck as to how to implement public class HomeController : Controller { readonly IWinterDb db; // Unity knows that if IWinterDb interface is asked for, it will inject in a new WinterDb()

How to use unsafe code Unity

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use c++ code in c# for unity using CLR. The program works properly outside of unity, but inside of engine it gives me an error: "cs0227: unsafe code requires the 'unsafe' command line option to be specified" I am really confused, because the project builds successfully in visual studio (without any errors or warnings). I have " allow unsafe " button activated. using UnityEngine; using System.Collections; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; public class

Unity apk开机自启动一次

跟風遠走 提交于 2019-12-03 07:21:35
1.需求 unity生成AndroidApk,只能首次启动启动,且后续关闭后重启不再启动。 2.首次启动 在Manifest文件中如下设置:android:priority设置较高是为了保证在其他launcher前启动。 <intent-filter android:priority="2000"> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.HOME" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> 3.关闭后apk禁用 public void DisableSetupWizard() { const int COMPONENT_ENABLED_STATE_DISABLED = 2; const int DONT_KILL_APP = 1; AndroidJavaClass unityPlayerClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject currentActivity =

Unity调用Android

你离开我真会死。 提交于 2019-12-03 07:19:37
1.Unity调用Android 根据unity用户手册,unity可以采用native code(c/c++),但是也提供了C#调用方法,本文对此进行简单讲解。 2.Unity获取android类 通过下述方法即可获取包com.ii.intentreceiver(可类比于C#命名空间)下的类MainActivity。继而可以调用MainActivity的静态方法getIntentResult。其返回值为string,如果无返回值,则直接调用CallStatic即可。 using (AndroidJavaClass mainActivityClass = new AndroidJavaClass("com.ii.intentreceiver.MainActivity")) { Debug.Log("IntentReceiver start catch infomation"); try { result = mainActivityClass.CallStatic<string>("getIntentResult"); } catch(Exception ex) { Debug.Log("IntentReceiver get result failed:" + ex.Message); } } 3.Unity获取android类的实例 通过下述方法即可获取包com.ii

Unity

十年热恋 提交于 2019-12-03 07:07:24
IDM下载器 百度网盘满速下载器(PanDownload) Visual Studio 2017正式版 v15.8.8 离线安装包 Unity官方正版下载 Beta版本 Releases版本 Patch版本 Unity破解版下载 百度网盘 提取码 9laq 天翼云盘 Unity官方资源(Asset Store) Unity2018离线文档下载 https://docs.unity3d.com https://docs.unity3d.com/uploads/UnityDocumentation.zip https://storage.googleapis.com/docscloudstorage/default/UnityDocumentation.zip Unity2017离线文档下载 https://docs.unity3d.com/2017.4/Documentation/Manual/ https://docs.unity3d.com/2017.4/Documentation/uploads/UnityDocumentation.zip https://storage.googleapis.com/docscloudstorage/2017.4/UnityDocumentation.zip Cg语言 http://developer.download.nvidia.com

Unity 手机屏幕适配

夙愿已清 提交于 2019-12-03 06:34:46
////如有侵权 请联系我进行删除 email:YZFHKM@163.com 1、游戏屏幕适配 屏幕适配是为了让我们的项目能够跑在各种电子设备上(手机,平板,电脑) 那么了解是适配之前首先要了解两个知识点: 1-1、什么是像素? 单位面积中构成图像的点的个数。 特点:单位面积内的像素越多,分辨率越高,图像的效果就越好。 1-2、什么是分辨率? 分辨率可以从显示分辨率与图像分辨率两个方向来分类。 示分辨率(屏幕分辨率)是屏幕图像的精密度,是指显示器所能显示的像素有多少.分辨率的单位有:(dpi点每英寸)、lpi(线每英寸)和ppi(像素每英寸)。 特点: 图像的分辨率越高,所包含的像素就越多,图像就越清晰,印刷的质量也就越好。 同时,它也会增加文件占用的存储空间。 1-3、移动设备分辨率 –以iphone 为例 Paste_Image.png 2、什么是适配? 什么是适配? 适应、兼容各种不同的情况 游戏开发中,适配的常见种类 ¤系统适配 针对不同版本的操作系统进行适配,例如Unity3D 5.4系统 ¤屏幕适配 针对不同大小的屏幕尺寸进行适配,例如Iphone5s,iphone7 iPhone的尺寸 3.5inch、4.0inch、4.7inch、5.5inch iPad的尺寸 7.9inch、9.7inch 屏幕方向 竖屏 横屏 3、Unity3D 中的屏幕分辨 3-1.