unity3d

Setting up Hololens MRTK 2.0 with Vuforia in Unity 2019.1

馋奶兔 提交于 2021-02-08 05:42:53
问题 I'm developing a Unity app for the Hololens 1 that uses Vuforia. Unfortunately, I cannot get the camera to work with Vuforia, it remains frozen in place and does not follow head movement. When I disable Vuforia, the camera tracks fine. My setup is as follows: * Windows 10 * Unity 2019.1.4f1 * MRTK v2.0.0 RC2 * Vuforia 8.1.11 I tried following the steps outlined here: https://github.com/Microsoft/MixedRealityToolkit-Unity/issues/1461#issuecomment-373714387 To no avail. I also tried having both

Making an Android phone vibrate for 100ms C#

不羁的心 提交于 2021-02-08 05:04:40
问题 I've been trying out a few games on my phone in the last week, and saw that some used vibration as a " feedback " for the player when something happened, like: The player crashed into a wall; The player did a perfect launch ; The player received a big prize ... and so on ... I really love how giving a little vibration or small shake to the phone, can basically tell the player that something important (for the game) happened , through an output that isn't only on the screen or comes from the

CircleCollider2D is not registering collisions with some tiles in a TileMapCollider2D

不打扰是莪最后的温柔 提交于 2021-02-08 04:32:52
问题 (I've asked this question over at Unity Answers too, but it can sometimes take a while to get a response there, if I get an answer there I'll put it here too.) I'm making a tile based game that uses Grid > Tilemap with cell layout as Hexagon. The player can move a certain distance based on movement level. My plan is to highlight valid movement spaces in green and invalid in red. To do this I've got a child GameObject called MovementRange that has a CircleCollider2D attached with it's radius

CircleCollider2D is not registering collisions with some tiles in a TileMapCollider2D

爷,独闯天下 提交于 2021-02-08 04:32:31
问题 (I've asked this question over at Unity Answers too, but it can sometimes take a while to get a response there, if I get an answer there I'll put it here too.) I'm making a tile based game that uses Grid > Tilemap with cell layout as Hexagon. The player can move a certain distance based on movement level. My plan is to highlight valid movement spaces in green and invalid in red. To do this I've got a child GameObject called MovementRange that has a CircleCollider2D attached with it's radius

CircleCollider2D is not registering collisions with some tiles in a TileMapCollider2D

自闭症网瘾萝莉.ら 提交于 2021-02-08 04:32:16
问题 (I've asked this question over at Unity Answers too, but it can sometimes take a while to get a response there, if I get an answer there I'll put it here too.) I'm making a tile based game that uses Grid > Tilemap with cell layout as Hexagon. The player can move a certain distance based on movement level. My plan is to highlight valid movement spaces in green and invalid in red. To do this I've got a child GameObject called MovementRange that has a CircleCollider2D attached with it's radius

GetHashCode() override coliding way to often

本小妞迷上赌 提交于 2021-02-08 04:09:00
问题 I'm using unity, and unity does not have a tuple in it, so I created my own tuple class to work since I needed it for my Dictionary. Dictionary <Tuple<int,int>, Tile> Tile class that I created and isn't really relevant to solve this problem(at least I think it wont help). But the problem is that I'm using both negative and positive integer in my tuples, and when I use my current GetHashCode() with the Tuples , sometimes I get the same HashCode, for example Tuple<-10, 8> and Tuple<-9,-10> both

Unity C# Nested IEnumerator

旧街凉风 提交于 2021-02-08 03:35:05
问题 In my code I have nested IEnumerator methods, such like this : private IEnumerator PerformRequest(string url) { // Doing stuff UnityWebRequest request = UnityWebRequest.Get(url); yield return request.SendWebRequest(); // Doing stuff } private IEnumerator PerformRequest2(string url) { // Doing stuff return PerformRequest(url); // Doing stuff } public IEnumerator PerformRequest3(string url) { // Doing stuff return PerformRequest2(url); // Doing stuff } I am wondering what is the difference if I

Unity C# Nested IEnumerator

*爱你&永不变心* 提交于 2021-02-08 03:33:17
问题 In my code I have nested IEnumerator methods, such like this : private IEnumerator PerformRequest(string url) { // Doing stuff UnityWebRequest request = UnityWebRequest.Get(url); yield return request.SendWebRequest(); // Doing stuff } private IEnumerator PerformRequest2(string url) { // Doing stuff return PerformRequest(url); // Doing stuff } public IEnumerator PerformRequest3(string url) { // Doing stuff return PerformRequest2(url); // Doing stuff } I am wondering what is the difference if I

UnityWebRequest not working in iOS

懵懂的女人 提交于 2021-02-07 19:18:00
问题 The examples given on https://docs.unity3d.com/Manual/UnityWebRequest.html works on Windows Desktop, Windows Mobile, Android and even in the iOS editor as expected. But when I publish the app to the Apple App Store it fails to connect to the internet. Unlike the other platforms, there is no noticeable delay and it seems to fail immediately when a request is attempted. The error is: Unknown Error Is there any special way that I need to configure the XCode project to allow an iOS app to connect

UnityWebRequest not working in iOS

五迷三道 提交于 2021-02-07 19:17:07
问题 The examples given on https://docs.unity3d.com/Manual/UnityWebRequest.html works on Windows Desktop, Windows Mobile, Android and even in the iOS editor as expected. But when I publish the app to the Apple App Store it fails to connect to the internet. Unlike the other platforms, there is no noticeable delay and it seems to fail immediately when a request is attempted. The error is: Unknown Error Is there any special way that I need to configure the XCode project to allow an iOS app to connect