unity5

Unity3d editor: how to prevent changes from being undone upon exiting play mode?

我的梦境 提交于 2019-12-01 11:02:42
Apparently this is some beginner's question (and that I am) but it's driving me crazy and I couldn't find any mention: I Occasionally forget to exit Play mode and go on building my UI making objects and changes, only to realize that I'm still in Play Mode and as soon as I unpress the play button, these will be purged! I suppose the Unity Editor has its reasons for allowing editing of Scripts/Scenes while in Play Mode (would be happy to hear some examples-maybe testing scenes?) but my main question here is: Is there some way for me to prevent this behavior? Or at least some trick that you use

How can I detect nearby GameObjects without physics/raycast?

天涯浪子 提交于 2019-12-01 10:32:39
问题 I am trying to detect the object's within a range having the player as origin point. How can I find the Transforms from a given area around the player without using colliders or Physics.OverlaptSphere() I don't want to use this method because the only information I need is the Transform of nearby Objects from a given LayerMask (more specifically, the position and rotation) If I would use Physics I would have to put a trigger over every point which I find unnecessary. Is there other method of

How to get full list of Unity shader properties

蹲街弑〆低调 提交于 2019-12-01 00:47:55
问题 I am quite new to shaders and have been searching for a full list of Unity shader properties. I haven't found any such documentation. What I found was SL-Properties. Where can I find a full list of properties and their functions? UPDATE An example was given in SL-Properties showing the list of properties for a water shader namely, _WaveScale , _Fresnel , _BumpMap and so on. Knowing these specific properties make it easier to arrive at a solution. I recently tried coding something similar to a

Integrate unity app to existing iOS app

ε祈祈猫儿з 提交于 2019-11-30 04:05:59
I have an iOS app export from Unity 5 and also I used vuforia to add ar to that Unity app. Now I want to integrate the Unity app to my existing iOS app. I have followed http://www.the-nerd.be/2015/11/13/integrate-unity-5-in-a-native-ios-app-with-xcode-7/#comment-446 tutorial and this is good for integrating Unity without Vuforia. So how can i do this and also its better to do this using swift i made a integration with Unity 5.3.8p8 and Vuforia 6.0.117 for iOS 8.4 and up . These tutorial is made for Objective-C, but you can do for Swift with no problem, just create a PREFIX HEADER and import

Unity: How to dynamically attach an unknown script to a GameObject (custom editor)

◇◆丶佛笑我妖孽 提交于 2019-11-29 12:10:47
I'm currently making a system for the Unity Editor (custom inspector and custom windows) that will automate and make things easier for the artists working on the game we're making, but I've hit a brick wall. I'm trying to find a way to dynamically add, through an editor Textfield input and a GUI button, an unknown script to a gameobject in the scene. The artist/programmer will type the name of the script in the textfield and it will search and add to a gameobject, but I don't know how to proceed with this, specially since some functions of gameObject.AddComponent() are deprecated as of Unity 5

Get current frame Texture from VideoPlayer

五迷三道 提交于 2019-11-29 12:01:37
It is stated in this post Using new Unity VideoPlayer and VideoClip API to play video that one can "retrieve texture for each frame if needed" What's the proper way to get the current frame as a Texture2D, please? EDIT: After the answer I did this but it's not working: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Video; public class AverageColorFromTexture : MonoBehaviour { public VideoClip videoToPlay; public Light lSource; private Color targetColor; private VideoPlayer videoPlayer; private VideoSource videoSource; private Renderer rend;

Use .NET's own httpClient class on Unity

99封情书 提交于 2019-11-29 11:21:14
I'm trying to do a HTTP Delete request from Unity and bump into the idea of use the HttpRequest class included in the System.Web namespace of .Net How can I achieve this, I supose that some sort of import of that namespace must be done, but how? Hope some one can give me some orientation HttpClient is only available in 4.5 NET and above and Unity does not use that version. Unity uses about 3.5 .NET version. If you are using Unity 5.3, UnityWebRequest.Delete can be used to make a Delete request. It can be found in the Experimental.Networking namespace. If you are using Unity 5.4 and above,

How to call method and return its value with UnityPlayer.UnitySendMessage

隐身守侯 提交于 2019-11-29 07:07:55
How can I call this C# method from Java then return the string value? public string getTest () { return "test"; } This is what I've tried: String str = UnityPlayer.UnitySendMessage("ProfileSave", "getTest",""); I am getting the below error String str=UnityPlayer.UnitySendMessage("ProfileSave", "getTest",""); ^ required: String found: void Programmer UnityPlayer.UnitySendMessage is a void function and does not return a value. Take a look at the UnitySendMessageExtension function implementation below. It is similar to turnipinindia's answer but it returns a value. It only returns a string so you

Visual Studio Debugger not attaching to Unity

对着背影说爱祢 提交于 2019-11-29 02:54:28
问题 I'm having issues getting Visual Studio's debugger to attach to Unity - editing and compiling scripts inside VS is working fine - however, when clicking "Attach to Unity" or "Attach to Unity and Play", the code compiles but nothing else happens. If all the builds are up-to-date then the button does nothing at all. I can manually start the game inside Unity and it runs the up-to-date code, but it is not attached to the VS debugger. I have Unity 5.3.5, Visual Studio Tools for Unity 2.2.0.0 and

Integrate unity app to existing iOS app

核能气质少年 提交于 2019-11-29 01:14:02
问题 I have an iOS app export from Unity 5 and also I used vuforia to add ar to that Unity app. Now I want to integrate the Unity app to my existing iOS app. I have followed http://www.the-nerd.be/2015/11/13/integrate-unity-5-in-a-native-ios-app-with-xcode-7/#comment-446 tutorial and this is good for integrating Unity without Vuforia. So how can i do this and also its better to do this using swift 回答1: i made a integration with Unity 5.3.8p8 and Vuforia 6.0.117 for iOS 8.4 and up . These tutorial