unity5

MySqlException: Access denied for user 'altjenb'@'localhost' (using password: YES)

走远了吗. 提交于 2019-12-12 02:15:14
问题 I dont know why am I getting this, user, altjenb has full access in the mysql db but I still keep getting the same error. I tried to use online db at mysql8.db4free.net and db4free.net and got the same error. tried in localhost (xampp) and still the same error.. MySqlException: Access denied for user 'altjenb'@'localhost' (using password: YES) this is the connection string MySqlConnection connectionstring = new MySqlConnection("Server=localhost; port= 3306; Database=battlehunt_db; UserId

Is it possible to create a model importer so that properties on the MeshRenderer of the model prefab can be tweaked?

不问归期 提交于 2019-12-12 02:08:24
问题 I want to create some default import settings for my models so that when a model is imported into the editor, I can modify the values of Receive Shadows , Motion Vectors , Reflection Probes , and other fields of the MeshRenderer children of that model on a prefab level. Is this possible? I prefer a solution so that the default import settings of the model file are modified, and that it won't be necessary for me to create a duplicate prefab of the model asset file. EDIT: Going with the

How to do occlusion with Google Tango in Unity?

佐手、 提交于 2019-12-12 01:52:22
问题 I am tring to do occlusion with Google Tango in Unity. What I want is pretty simple to understand: when there is a real object in front of a virtual object, the virtual object is hidden (or rendered differently) The perfect result would be like it is in this impressive video I found: https://www.youtube.com/watch?v=EpDhaM7ZhZs . I already tried the "Enable occlusion" option of the Tango Camera and I am not so happy with the results (it is not accurate and not real time as it is based on mesh

How to show ui elements on top Unity

情到浓时终转凉″ 提交于 2019-12-12 01:48:43
问题 how can I show my ui elements on top of the others ? http://prntscr.com/brjccg you can see the right side of the panel but the left one is under the map object. How can fix that i want to see both sides of it ? Here's the components it currently has on http://prntscr.com/brjdab 回答1: Unity renders UI from top to bottom. Anything you want on top should be placed at last in hierarchy. This only works with UI elements. To change rendering order between 2D Sprite Objects and UI elements e.g Canvas

Accesing a script attached to another object

风流意气都作罢 提交于 2019-12-12 00:52:43
问题 I have a set of code attached to one of my game objects, that I am trying to access from the script in another object. I am trying to access the "Move" function in this script: using UnityEngine; using System.Collections; public class MoveBackwards : MonoBehaviour { #region Inspector public float maxRotationDegrees = 10f; public float rotationSpeed = 2f; public float maxDistance = 5f; public float moveSpeed = 2f; #endregion //Inspector private float traveledDistance; private float

what is AppLink URL in FB.Mobile.AppInvite in Facebook SDK for Unity? and how to get it? or make it?

有些话、适合烂在心里 提交于 2019-12-11 13:34:18
问题 I am using Unity 5.3.4f1 and Facebook SDK for unity 7.4 The problem is poor documentation and not having step by step guide to facebook SDK FB.Mobile.AppInvite in: https://developers.facebook.com/docs/unity/reference/current/FB.Mobile.AppInvite FB.Mobile.AppInvite( new Uri("www.HereGoesTheAppLinkUrl.com"), new Uri("https://www.dropbox.com/s/vzl519vvf4hfe3j/3DTank1200X628.png?dl=0"), AppInviteCallback }; The issue is what is AppLink? how to create it? any Csharp code for that? where is the

Unity: GameObject always at center regardless of position changes

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 13:23:51
问题 I am working on a 2D game and have created a game object using C# script as below. I also set my camera to orthogonal and have adjusted my sprite based on the width of the screen. Regardless of the position I set, the object is always at the center of the screen. How can I solve this? using UnityEngine; using System.Collections; public class TestingPositions : MonoBehaviour { GameObject hero; Sprite heroSprite; Vector3 heroPosition; // Use this for initialization void Start () { hero = new

How do I reset to the default Camera setting?

旧时模样 提交于 2019-12-11 11:05:38
问题 When you first run Unity, it has that scene where an Area Light is acting like a sun, and the camera is a nice shade that allows you to clearly see around you. I accidentally changed my settings on my Main Camera, and it has stayed there, and is a solid color of blue. How do I get the original camera settings back? 回答1: Just click that little gear and reset it: 回答2: Delete your main camera. Make a new camera. Drag it back into the hierarchy. Rename it to the name of your original camera. That

Can't destroy Transform component of error

时间秒杀一切 提交于 2019-12-11 08:31:12
问题 I've got some Unity code that creates a grid (2^dimensions in total) of one prefab using a c# script. Upon changing the 'dimensions' value (via the editor for now), I'd like to see all the prefabs get deleted, before Unity updates using OnValidate. Unity does not seem to want to delete the previous set of objects representing the space, as these objects are still accessible in the Unity Hierarchy Pane: Having trouble destroying objects in unity. the error says: "Can't destroy Transform

How to detect if unity game is running on (web keyboard) or (mobile touch)

房东的猫 提交于 2019-12-11 08:20:03
问题 basically, I have a unity game supported by physical keyboards and touch screens in mobile devices. I already finished my movement script for physical keyboards, and now, I'm coding for touch screens. How can I achieve that detect feature? I was thinking something like that... private void HandleInput() { if (detect if physical keyboard here...) { if (Input.GetKey(KeyCode.RightArrow)) { _normalizedHorizontalSpeed = 1; } else if (Input.GetKey(KeyCode.LeftArrow)) { _normalizedHorizontalSpeed =