Code: Select all
using UnityEngine;
using System.Collections;
using PixelCrushers.DialogueSystem;
using UnityEngine.UI;
namespace PixelCrushers.DialogueSystem.SequencerCommands
{
public class SequencerCommandChangeBackground : SequencerCommand
{ // Rename to SequencerCommand<YourCommand>
public void Awake()
{
int index = GetParameter(0); // error CS0029: Cannot implicitly convert type 'string' to 'int'
Image background = GameObject.Find("Dialogue Background").GetComponent<Image>();
background.sprite = Resources.Load<Sprite>("Backgrounds/" + index.ToString());
Stop();
}
}
}
Thanks in advance, have a nice weekend Tony.