Gameobject instatiating in editor but not after I build it

HI guys. I have a gameobject(portal) that needs to be instatiated after a while. When I run it in the editor everything works fine, but after I build and run it the object doesn’t spawn. I have checked in the ouput_log but there are no errors and the debug message I put in also isn’t there. I have tried different ways of instantiating it (like using Resources.load in the instantiate) and also tried putting the prefab under Resources, but to no avail. Any suggestions of what it could be?

if(Math.Round (Time.time,0) == lastIncrease + 18 && chargeLevel < 50){
			lastIncrease = Math.Round (Time.time,0);
			if(GameObject.Find ("EndPortal").GetComponent<LifesManager>().lifes  > 0)
				chargeLevel += 1;

		}


		if (chargeLevel == 2 && once == 1 && GameObject.Find("EndPortal").GetComponent<LifesManager>().lifes > 0 && portal != null) {

			once = 0;
            Instantiate(Portal, new Vector3(-477.7548f, 1007.526f, 375.1212f), Quaternion.identity);
            Debug.Log("Portal Spawned"); // This never appears in the ouput_log file
            gameObject.GetComponent<ParticleSystem>().enableEmission = false;

        }


        if(chargeLevel == 2 && portal == null && once == 1)
        {
            once = 2;
            gameObject.GetComponent<ParticleSystem>().enableEmission = false;

        }
	
	}

Finally found the problem. I forgot to round lastIncrease , hence the rounded Time.time was never equal to it.