unity

Unity android project throws “Your hardware does not support this application sorry” error

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have been investigating for 2 days. I have read a lot of things. To summarize what I read: Non-NEON devices will not work with UNITY 5 builds. You should set your Install Location to "Automatic or Force Internal" You should set your Write Access to "Internal Only" Along with the above ones, I also tried with these texture compression settings: Don't override DXT (Tegra) Also there are two cases that I tried: When I built the game from UNITY and generate an apk. It worked fine on the phone. I selected "Google Android Project" and exported

Using LogManager.GetLogger with Unity

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Given this class: class Foo { readonly ILog log; public Foo(ILog log) { this.log = log; } ... } I'd like to configure Unity to inject ILog. That's easy: container.RegisterInstance<ILog>(LogManager.GetLogger(typeof(XYZ))); But I'd like to make Unity call LogManager.GetLogger with the type of the parent type being resolved. This is close: container.RegisterType<ILog>(new InjectionFactory((c, t, s) => LogManager.GetLogger(t))); But t in this case is the type being resolved ( ILog ), not the type that the object is being resolved for ( Foo ). I

How to integrate Unity into a Swift 3 iOS project

匿名 (未验证) 提交于 2019-12-03 02:52:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I was just wondering what might be the best strategy for implementing a Unity project into a already existing Swift 3 iOS project. So far I only discovered sample code in Objective-C. Is there any popular framework or wrapper out there? 回答1: in my opinion this guide is extremely helpful: https://github.com/blitzagency/ios-unity5 Please note that there are some pitfalls: First I had several linker errors, but I did not take into account that the Unity project configuration was set up for "real devices" only. When I tried to build the project

Unity: Call android function from Unity

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: AndroidJavaClass unityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject activity = unityPlayer.GetStatic("currentActivity"); activity.CallStatic("testMethod"); This is how I call Android static function without argument, and its works perfect. But I have issue when I'm trying to call non-static function with arguments. I'm trying to call it like that: activity.Call("testMethod", "testString"); But Android throws exception: AndroidJavaException: java.lang.NoSuchMethodError: no non-static method "L**myActivity*

Signalr &amp; WebSocketSharp in Unity3d

匿名 (未验证) 提交于 2019-12-03 02:50:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've currently built a simple Signalr Hub which I'm pushing messages to from a Unity5 project. Given that SignalR2 client doesn't work with Unity5 I'm using websocketsharp in order to intercept the websocket frames. The messages are being pushed to the Hub successfully, but when I attempt to call a method on the client, I do not get the payload string, only the message identifier {"I": 0} Looking through the SignalR documentation, it looks like this gets sent last, but I have no idea how I can get a hold it it. I'm sure its something simple,

Build Unity project with Jenkins failed

匿名 (未验证) 提交于 2019-12-03 02:49:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to build Unity project with Jenkins on Mac OS Server. But when I try to run the following script /Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode ${PROJECT_PATH} -executeMethod BuildScript.DevelopmentBuild The script shows this, _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. Does anyone knows how to fix the problem? 回答1: Try write from Terminal: sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist sudo mv /Library

IronPython in Unity3D

匿名 (未验证) 提交于 2019-12-03 02:46:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to use IronPython as an external scripting language for Unity3D. The necessary DLLs for IronPython's execution load just fine inside of Assets\Plugins. However, when I try to run the script I get this error: PythonImportErrorException: No module named UnityEngine IronPython.Modules.Builtin.__import__ (IronPython.Runtime.Calls.ICallerContext,string,object,object,object) <IL 0x0003b, 0x001cc> (wrapper dynamic-method) object.__import__##5 (IronPython.Runtime.Calls.ICallerContext,object,object,object,object) <IL 0x0000e, 0x0004d>

Configure Unity DI for ASP.NET Identity

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm using Unity successfully for all regular constructor injection such as repositories etc., but I can't get it working with the ASP.NET Identity classes. The setup is this: public class AccountController : ApiController { private UserManager _userManager { get; set; } public AccountController(UserManager userManager) { if (userManager == null) { throw new ArgumentNullException("userManager"); } _userManager = userManager; } // ... } with these configs for Unity: unity.RegisterType (); unity.RegisterType >(new HierarchicalLifetimeManager())

Ninject vs Unity for DI [closed]

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We are using ASP.net MVC. Which of these is the best DI framework Ninject or Unity and why? 回答1: Last time I looked at either of them I found Ninject slightly better. But both have their drawbacks. Ninject has a better fluent-configuration scheme. Unity seems to rely mostly on XML configuration. Ninject's main drawback is that it requires you to reference Ninject.Core everywhere in your code to add [Inject] attributes. If I may ask, why are you limiting your choices to these two? I think Castle.Windsor, Autofac and StructureMap are at least

Unity3D - Add custom headers to WWWForm

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Here is the C# Code I ran: WWWForm formData = new WWWForm (); //Adding formData.headers.Add ("Authorization", "Basic " + System.Convert.ToBase64String(Encoding.UTF8.GetBytes(CONSUMER_KEY + ":" + CONSUMER_SECRET))); formData.headers.Add ("Host", "api.twitter.com"); //Assigning formData.headers ["Host"] = "api.twitter.com"; formData.headers ["Authorization"] = "Basic " + System.Convert.ToBase64String (Encoding.UTF8.GetBytes (CONSUMER_KEY + ":" + CONSUMER_SECRET)); Debug.Log (formData.headers ["Authorization"]); As shown above, I tried to add