How can I look through my camera in the Scene view in Unity?
Actually, it’s GameObject Menu->Align View To Selected.
Actually, it’s GameObject Menu->Align View To Selected.
WebGL is not a failure in the making. Speaking like it’s a failure shows these peoples ignorance. That said, if you’re just starting out, explore your options. If you’re looking for more eyes than just windows users, stay away from proprietary solutions. Microsoft’s dominance isn’t big as people think, anymore. IE is fading in popularity, … Read more
Finding child GameObject by index: You can get the first child of a GameObject with the GetChild function. GameObject originalGameObject = GameObject.Find(“MainObj”); GameObject child = originalGameObject.transform.GetChild(0).gameObject; You can get other children by providing index number of the child GameObject such as 1,2,3, to the GetChild function. and if its a child of a child in … Read more
I am going to give you a code snippet of mine because I feel like being helpful. Hope this helps! protected ScrollRect scrollRect; protected RectTransform contentPanel; public void SnapTo(RectTransform target) { Canvas.ForceUpdateCanvases(); contentPanel.anchoredPosition = (Vector2)scrollRect.transform.InverseTransformPoint(contentPanel.position) – (Vector2)scrollRect.transform.InverseTransformPoint(target.position); }
I finally fixed the issue. This may be a workaround but it works. So if anyone having this issue, just follow this: Swap the position of jcenter() and google() in project gradle file and in also all the other module you have in your project. Like in mine I have crashlytics, fabric so just remember … Read more
Finally after a lot of trials managed to do this. These are the steps. 1) Using this link, export android project for Gradle. Select Gradle in the Build Settings window and check the Export Project checkbox. Click Export and select the destination folder. 2) Import the generated folder in Android studio. Select ok whenever prompted. … Read more
Since no-one has posted any example code: private int GiveMeANumber() { var exclude = new HashSet<int>() { 5, 7, 17, 23 }; var range = Enumerable.Range(1, 100).Where(i => !exclude.Contains(i)); var rand = new System.Random(); int index = rand.Next(0, 100 – exclude.Count); return range.ElementAt(index); } Here’s the thinking: Build a Hashset of numbers you want to … Read more
Like always: it depends. I use singletons of both kinds, components attached to GameObject and standalone classes not derived from MonoBehaviour. IMO the overall question is how are instances bound to the lifcycle of scenes, game objects, … And not to forget sometimes it is more convenient to have a component especially referencing other MonoBehaviour … Read more
If you want to leverage on XNA API, you should bet on MonoGame. It is a compatible XNA API that is targeting to run on several platforms (including several non Windows platforms using OpenGL). The development is very active, MonoGame is recently getting a full 3D stack that is starting to work on Windows Metro … Read more
The following worked for me (Props to @LinusR and by extension @Kinxil) This is just a quick step-by-step. This should work for you if you are using Visual Studio w/ Unity Tools. Find the loop: Open Visual Studio (if not already open) Click Attach to Unity (if not already attached) Click Break All (pause II … Read more