dont destroy on load unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;// Object.DontDestroyOnLoad example.
//
// This script example manages the playing audio. The GameObject with the
// "music" tag is the BackgroundMusic GameObject. The AudioSource has the
// audio attached to the AudioClip.public class DontDestroy : MonoBehaviour
{
void Awake()
{
GameObject[] objs = GameObject.FindGameObjectsWithTag("music"); if (objs.Length > 1)
{
Destroy(this.gameObject);
} DontDestroyOnLoad(this.gameObject);
}
}
Also in C#:
- disable mouse unity
- c# input integer
- prefab gets character transform
- c# md5 hash file
- add row count devepxress report
- dontdestroyonload unity
- how to flip selection in aseprite
- unity making homing missile
- set decimal point c#
- c# build string out of list of strings
- unity get child
- O thread de chamada não pode aceder a este objecto porque existe outro thread que já o tem
- Instantiate c#
- unity separator in inspector
- is start called after dontdestroyonload
- convert array object to int[] c#
- c# ?
- datatable return column names
- serilog loglevel order
- string format comma c#
- reverse a string in c#
- unity random float
- nunit return parameter
- unity rotate vector