unity3d

Unity An object reference is required to access non-static member C#

蹲街弑〆低调 提交于 2021-01-28 01:11:08
问题 Im trying to learn C# with Unity engine But a basic script like this: using UnityEngine; using System.Collections; public class scriptBall : MonoBehaviour { // Use this for initialization void Start () { Rigidbody.AddForce(0,1000f,0); } // Update is called once per frame void Update () { } } gives this error: Assets/Scripts/scriptBall.cs(8,27): error CS0120: An object reference is required to access non-static member `UnityEngine.Rigidbody.AddForce(UnityEngine.Vector3, UnityEngine.ForceMode)'

Firebase Crashlytics: missing OPTIONAL dSYMs

旧巷老猫 提交于 2021-01-28 01:04:36
问题 We've moved from fabric.io to Firebase and everything seems to be ok except one thing. We're using Unity 2019.2.6 , target platform is iOS , target architecture is " Universal ". For dSYMs uploading I pack dSYMs folder from *.xcarchive to dSYMs.zip and upload it to Firebase via the following code ./upload-symbols -gsp <path_to_plist>/GoogleService-Info.plist -p ios <path_to_dSYMs.zip>/dSYMs.zip As a result I see the following lines in my terminal: Successfully submitted symbols for

Find an inactive gameObject with tag?

人盡茶涼 提交于 2021-01-28 00:28:48
问题 Is there a way to find inactive gameObjects with a tag? There are answers saying no its not possible but that was in 2013. Any recent changes to do this? public GameObject[] FindWithTag; void Update() { FindWithTag = GameObject.FindGameObjectsWithTag("Player"); foreach (GameObject FindWithTags in FindWithTag) { ... } } 回答1: No. You still cannot find a disabled object with FindGameObjectsWithTag. GameObject.FindGameObjectsWithTag - Manual: Returns a list of active GameObjects tagged tag.

Hide/Unhide object in Unity3D via script

…衆ロ難τιáo~ 提交于 2021-01-28 00:15:00
问题 i want to set part of my scene to be hidden before everything starts, so lets say i have some isHidden (which im trying to find) property that i set to true before, or at the first frame of my scene. at some point i want to unhide it and trigger the animation, i know how to trigger the animation. and the only way i found to hid object is to set it like : SetActive(false); it does hide is, but when i am trying to access it later in the script with GameObject.Find("gameObjectName"); it returns

Unity:How to find the value of a vector 3 allong a specific axis?

瘦欲@ 提交于 2021-01-27 19:40:30
问题 For example, you might use something like: public Vector3 Inertia = new Vector3(); void Update() { Inertia += transform.TransformDirection(Vector3.forward) * Input.GetAxis("Thrust") ; transform.Translate(Inertia * Time.deltaTime); } If you want fly a spaceship in a 3D space with all degrees of freedom. Inertia keeps track of momentum in world space while the controls add to it along the axes of the players orientation. But, now I want to check what the players speed is along his current

Unity3D 5 packages conflict

[亡魂溺海] 提交于 2021-01-27 16:59:27
问题 I have Unity 5.0.2f1 . Firstly, I've successfully added GooglePlayGamesPlugin-0.9.20.unitypackage to my project. Then, I've tried to import GoogleMobileAds.unitypackage, but I got these errors: Error importing folder (The pathName assets/plugins is already mapped to fce8a713f1e5a4cc4b9973d1ef630f31. But the meta data wants it to be mapped to cbde64d36fd994c458fffca9e931b232) Error importing folder (The pathName assets/plugins/android is already mapped to b8f0d9a6a7f9240c981894807effddbc. But

How to add JavaScript support to Unity 2019?

邮差的信 提交于 2021-01-27 16:17:00
问题 I developed a game years ago and now decided to improve the game and started to download the unity again. after upgrading Unity I figured out Unity doesn't know all JS files and has detached them from objects. any solution that fixes the problem and adds JS support to Unity again? 回答1: August 2017 All the way back to Unity 1.0, the Unity game engine has supported a version of JavaScript called UnityScript. Today on the Unity blog, Unity have announced that they will no longer be supporting

How to add JavaScript support to Unity 2019?

两盒软妹~` 提交于 2021-01-27 16:10:00
问题 I developed a game years ago and now decided to improve the game and started to download the unity again. after upgrading Unity I figured out Unity doesn't know all JS files and has detached them from objects. any solution that fixes the problem and adds JS support to Unity again? 回答1: August 2017 All the way back to Unity 1.0, the Unity game engine has supported a version of JavaScript called UnityScript. Today on the Unity blog, Unity have announced that they will no longer be supporting

How to add JavaScript support to Unity 2019?

旧时模样 提交于 2021-01-27 16:09:27
问题 I developed a game years ago and now decided to improve the game and started to download the unity again. after upgrading Unity I figured out Unity doesn't know all JS files and has detached them from objects. any solution that fixes the problem and adds JS support to Unity again? 回答1: August 2017 All the way back to Unity 1.0, the Unity game engine has supported a version of JavaScript called UnityScript. Today on the Unity blog, Unity have announced that they will no longer be supporting

Understanding The Execution of Coroutines

大憨熊 提交于 2021-01-27 14:52:58
问题 I'm working in Unity, but this is really just a C# question so I hope this is the right section to post this. Anyways, I still have trouble visualizing the execution of scripts in my head, especially when there are more than one running and they all have different functions. It's gotten more complicated recently as I've added Update, FixedUpdate, and Coroutine to my list of "When's this running"? Update and Fixed Update I get the gist. As for Coroutine, I basically understand it's a type of