Fixed merge conflict
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2d992ef55bc28784f81e79dd5cca414b
|
||||
guid: 9f23d4bd550984f49b2c2a8bcbe09106
|
||||
@@ -1,2 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8cf96fedb0da0ff4f947cad1c84e352b
|
||||
guid: 7013f170d8048394086d9eaefef0e9e5
|
||||
@@ -1,2 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 648d9484af013c346bd5ae603a8c7185
|
||||
guid: 54e66fbdb6a33134a934139bbf7252ef
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 950ad2ddcd752c84a92eec2603508248
|
||||
guid: d5784a22cabb71241a8c6ca4adf98770
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
|
||||
31
Assets/Scripts/ZmenScenu.cs
Normal file
31
Assets/Scripts/ZmenScenu.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI; // Nutné pro práci s UI komponentami
|
||||
|
||||
public class CudlikZmenaSceny : MonoBehaviour
|
||||
{
|
||||
// Toto políèko uvidíš v Inspectoru pøímo u tlaèítka
|
||||
[SerializeField] private string nazevCiloveSceny;
|
||||
|
||||
void Start()
|
||||
{
|
||||
// Automaticky øekne tlaèítku, co má dìlat, když na nìj klikneš
|
||||
Button btn = GetComponent<Button>();
|
||||
if (btn != null)
|
||||
{
|
||||
btn.onClick.AddListener(Prejdi);
|
||||
}
|
||||
}
|
||||
|
||||
void Prejdi()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(nazevCiloveSceny))
|
||||
{
|
||||
SceneManager.LoadScene(nazevCiloveSceny);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Zapomnìl jsi vyplnit název scény na objektu: " + gameObject.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/Scripts/ZmenScenu.cs.meta
Normal file
2
Assets/Scripts/ZmenScenu.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c856cdbfd0442ab40a9314b3d352ac43
|
||||
Reference in New Issue
Block a user