Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

my particle system works correctly scene window but doesnt work on game window

Discussion in 'Editor & General Support' started by salihburakselvi, Nov 13, 2020.

  1. salihburakselvi

    salihburakselvi

    Joined:
    Nov 13, 2020
    Posts:
    3
    I have a very simple code also it works on scene window correctly but it doesnt work game window
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class test : MonoBehaviour
    6. {   public ParticleSystem prsy;
    7.    
    8.     // Start is called before the first frame update
    9.     void Start()
    10.     {
    11.        
    12.        
    13.     }
    14.  
    15.     // Update is called once per frame
    16.     void Update()
    17.     {
    18.         if (Input.GetAxis("Horizontal")>0)
    19.         {
    20.             prsy.Emit(20);
    21.            
    22.         }
    23.      
    24.     }
    25. }
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    You'll need to explain what "doesnt work" actually means.
     
  3. salihburakselvi

    salihburakselvi

    Joined:
    Nov 13, 2020
    Posts:
    3
    ı dont see any particles on game window but I see particles on scene window
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    The first things I'd look at are distance to camera (make sure the distance is between the camera's near and far clipping planes), obviously make sure they are actually in front of the camera, and check assigned layer of the particles compared to what the camera is set to view.
     
  5. salihburakselvi

    salihburakselvi

    Joined:
    Nov 13, 2020
    Posts:
    3
    I found solution. particle position-z is set to -250 but it must be 250