How to fix VFX to showing up Unity 3D - c#

I'm using Stylized Slash VFX asset for my game currently. When I call the .Play() function from script on play it shows up in the editor tab. But, in the game and build it doesn't. Does anyone know why and how to fix this?

Related

From UI scene to Game. No cameras rendering error

I am building a 2D proyect in Unity, when I play the game and try to go from the play button (from MainMenu UI) to the second scene ( 1 on the index value) y keeps giving me the error of display 1 no cameras rendering. I have experienced this error before and the problem was that the scene was not on the build settings but this is not the case. If anyone could help me I will be really appreciated.
You do not have active GameObject with Camera component on it in the second scene. Use rightclick in the Hierarhy then Camera.
You can open Game window without starting the game. You can see what this scene will look like in runtime.

Animations don't work when I drag them to Unity

This is the first time I try to use animations in Unity so my friend built a campfire in blender and also made animations so the fire seems like it's moving. When he converted it to fbx and sent it to me, I downloaded the fbx, dragged it to the Unity project. I thought that the animations should work and I should see the fire moving when I play the game, but unfortunately the fire seemed like it's a not moving object. I screen recorded it so you will understand the problem better. If anyone knows how to fix this problem, it will really help me. Thank you!
First of all You have to check FBX import settings to be sure, that animation is exist. Select your fbx in Unity and switch to 'Animation' Tab in Inspector. If Animation is exist, You'll see animation import settings. Be sure toggle 'Import Animation is active':
If Your FBX does not have animation, in animation tab You'll see message 'No animation data available in this model'.
If FBX is okay, the next step is checking your fire gameobject. It must contains Animator component with some animation controller. This animation controller will play anim clip from your FBX.
But first af all I recommend your check this: Unity Animation Manual

Blue screen appeared after Build & Run project in unity

So i made my first unity game. I run (play) the scene on unity every thing works fine. (no exceptions or error what so ever). Then i tried to Build & Run the project, but after launching the game, Unity splash screen appeared and than my screen was covered with complete blue screen. And nothing happens from there. Am i missing something?
Important points to know
My 2D game has no main menu options (start,restart,quit)
This is just a simple platformer game, i.e player run,jump on tiles,
collect coins e.t.c
I have not created any of splash screen in start of game
Do i need to write some code to make it build and run from exe? please help
This also happened with me when I started unity. I fixed this issue by adding a scene into my "Build settings" panel. Before that, Unity was loading from sample scene which happened to be blue. I had to unselect this sample scene, and select a new scene, to make it run from my saved scene.
If the "Game" pane still shows blue, check that one of the scenes listed in your "Build Settings" panel is selected in the "Project" pane.
This sounds like you need to set your canvas scaler to scale with screen size.
This happened to me after I tried to upgrade my version of Unity, the upgrade failed, and I had to revert to an old version.
Specifically, I had the change on a git branch and reverted all the files back to my master branch in git, but it did not revert the files in .gitignore.
I was finally able to fix this by closing Unity, deleting the Temp directory in the project, and restarting Unity. Came right back up. Note that I tried "Reimporting all assets" before and that did not solve it. I needed to delete Temp.

Unity Multiplayer Cube Auto Move?

I have followed the Unity official Multiplayer Guide below and everything works, except for the fact that when I run two instances on the same computer (1 in build run and the other in the play mode) the characters for some reason auto move in a circle.
I have no idea why this is since I have followed the tutorial exactly, unless I missed something :P I am currently on step 9 (identifying local player) and I stopped there cause my players keep moving in circles.
To Clarify, they aren't spinning in place, they are walking in a circle. Just imagine a person following a dotted circle on the floor, same idea.
This issue only happens when i run two instances (build run mode and play mode in unity). if i try only the play mode in unity, everything works fine.
Has anyone experienced this before?
Unity Multiplayer Tutorial: https://unity3d.com/learn/tutorials/topics/multiplayer-networking/network-manager?playlist=29690
I am on version 2017.2.0f3 <-- maybe this is why? should I update to a different patch?
Thank you in advance
Where I spawn the characters
build and run, player just moves in circles automatically
both build run and play mode, they both again moves in circles automatically
I see a first issue in your code:
PlayerController.cs line 36, you wrote
var bullet = (GameObject)Instantiate(BulletPrefab, BulletSpawn.transform.position, BulletSpawn.transform.rotation);
it should be
var bullet = (GameObject)Instantiate(BulletPrefab, BulletSpawn.position, BulletSpawn.rotation);
Since BulletSpawn is already a Transform. Otherwise bullets might not fire in the gun direction.
I don't have any of the player moving without me pressing keybord key.
Here is a screenshot of 2 build run working good:
I also tried Build run + Unity Editor in game mode, I had no problem.
Maybe the problem comes from your keyboard or the input manager of unity ? Since you are using Input.GetAxis, check this https://docs.unity3d.com/Manual/class-InputManager.html
The issue with your character automatically moving is because you have something plugged into your computer that acts as a controller/joytick. Go into settings for controls and set all joystick to the last joystick #. Make sure you set this for all vertical and horizontal movement. That should do the trick.
For example, if you use a 3D mouse like 3D connexion, it could act as a joystick/controller and auto move your character.

Why can't I drag and drop items from the assets folder to the game editor screen in Unity3D?

Recently I was working on a project in Unity3D, just a simple game. But when I tried to attach a material from the assets folder with the drag-and-drop function, it didn't work. Does somebody know how to fix this?
Material is not a component. That why you cant attach it to a game object. You need to drag & drop it to Materials section in a Mesh Renderer.

Categories

Resources