Converting to Legacy Animation Type breaks Animation
I have a model that is "Mecanim Ready", 1 FBX file with the model, and another FBX file with an animation. The animations work fine and I can see the model animated in the preview window. However, I...
View ArticlePlay ParticleSystem on RayCastHit Object
I have a GameObject with a Particle System component on it (this is an enemy). I have attached a blood Particle Effect to enemy so when I hit the enemy, the blood will show. How can I play the Particle...
View ArticleGet a var's value plus X without modifying?
My camera follows (looks at) a GameObject that needs to be at the Player's 0,0,0. However I want the camera to follow 5 units in front of this GameObject. No matter what I've tried, the camera always...
View ArticleLoop a function, once per second, X number of times
I need to call a function once per second for X number of times. How can I do this? I can't use an IEnumerator because "yield return new WaitForSeconds(5);" inside of a For Loop exits the For Loop, and...
View Articletransform.position = new Vector 3 NOT moving to correct position?
I'm moving my GameObject via transform.position using this line exactly: *transform.position = new Vector3 (-5.6f, -2.5f, 3f);* Before this line is called, the GameObject is at position (-5.56, -2.35,...
View ArticleCannot rotate GameObject from C# Animator attached
I have tried almost every api call that lets you rotate a gameobject, and this thing will NOT rotate via code, using C#. - It has an animator attached that animates rotation, but the rotation animation...
View ArticleRecord Animation Clip from changes made with Mesh API?
I'm using the Unity mesh API to move vertices and recalculate normals. Now, I want to release on a platform with strict CPU limitations, and I cannot animate via Mesh API anymore. Is there anyway I can...
View Article[Editor Scripting] Call Function in other GameObjects Editor Script?
I am scripting in an editor script, both GameObjects A and B have the script. In the Editor Script, I have created gameobject B (from A) by using : GameObject objB = null; (it's populated later) Now, I...
View ArticleEditor Scripting: How To Detect a Change in Player Settings
I want to detect when a change is made to player settings. Specifically, when the Unity user makes a change to the Android "Bundle Identifier", I want to call some Editor scripting code. OnValidate()...
View ArticleAsyncOperation for SceneManager.LoadSceneAsync doesn't adhere to...
I'm loading levels with: AsyncOperation async = SceneManager.LoadSceneAsync() I've set background loading priority via: Application.backgroundLoadingPriority = ThreadPriority.Low; According to...
View ArticleScript To Update Post Process Profile At Runtime [2018 HDRP]
I have manipulated post processing profiles at runtime previously with no problem. Now I'm using: - Unity 2018.4.28f1 - Post Processing Stack v2 3.0.1 - High Definition Render Pipeline (HDRP) 4.10.0...
View ArticleShader: Modify XY Position of Texture
I want to write a shader that renders textures at specific XY locations. Say there are 4 textures assigned to the shader: A, B, C, D ![acbd][1] [1]: https://i.postimg.cc/3rfVf8Wx/abcd.jpg A, B, C, and...
View ArticleShader: 1 Base Texture Overlaid by 1 Transparent Texture.
Trying to write a shader that takes 2 textures. The first is a base layer which only displays RGB data and does not have any transparency. Just a basic diffuse: ![alt text][1] The transparent texture...
View ArticleShader: Mask Without a Texture?
I have a shader working that has a sampler2D for a mask. Black is hidden and white areas are visible: void surf(Input IN, inout SurfaceOutput o) { float2 newuv = TRANSFORM_TEX(IN.uv_ArmUpper,...
View Article