FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.


descriptionHelp creating a pause menu[Script Available]

Hello guys I have this problem with this pause menu script where I just want to put buttons simply just put a menu button and retry button. And if possible disable mouse look. Thanks really appreciate ur help guys!!


var paused : boolean = false;

function Update () {

 if(Input.GetKeyDown("p") && paused == false) {  
 paused = true;  
 Time.timeScale = 0;
        else if(Input.GetKeyDown("p") && paused == true) {
                paused = false;
                Time.timeScale = 1;

descriptionRe: Help creating a pause menu[Script Available]

GetComponent<MouseLook>().enabled = true;
GetComponent<MouseLook>().enabled = false;



using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using UnityStandardAssets.CrossPlatformInput;
using UnityStandardAssets.Utility;
using Random = UnityEngine.Random;
using UnityStandardAssets.Characters.FirstPerson;
public GameObject player;
void Update (){
player.GetComponent<FirstPersonController>().GetComponent<MouseLook>().enabled = !player.GetComponent<FirstPersonController>().GetComponent<MouseLook>().enabled;

Otherwise watch this
Permissions in this forum:
You cannot reply to topics in this forum