Hi, I am getting this error which began when I installed an asset store script.
Assets\OWCS\Scripts\SequenceManager.cs(188,16): error CS0246: The type or namespace name ‘SmoothFollow’ could not be found (are you missing a using directive or an assembly reference?)
The file causing the issues is below:
using UnityEngine;
using System.Collections;
using UnityEngine.Rendering.PostProcessing;
namespace OWCS
{
public class SequenceManager : MonoBehaviour
{
public CharacterTransition CharSwitch;
public static SequenceManager Instance;
DepthOfField depth;
void Awake()
{
Instance = this;
depth = Camera.main.GetComponent<DepthOfField>();
}
public IEnumerator DoCharSwitch(Character c)
{
int i = 0;
Transform t = CharSwitch.Follower.transform;
while(i < 3 )
{
if (i == 0)
{
depth.enabled = true;
CharSwitch.Follower.height = CharSwitch.Height;
while (Mathf.Round(CharSwitch.Follower.transform.position.y) != CharSwitch.Height)
{
if (CharSwitch.Follower.transform.position.y == t.position.y)
{
Vector3 pos = CharSwitch.Follower.transform.position;
pos.y = Mathf.Round(CharSwitch.Height / 3);
CharSwitch.Follower.transform.position = pos;
depth.aperture = 0.8f;
yield return new WaitForSeconds(0.75f);
}
if (CharSwitch.Follower.transform.position.y == Mathf.Round(CharSwitch.Height / 3))
{
Vector3 pos = CharSwitch.Follower.transform.position;
pos.y = pos.y + Mathf.Round(CharSwitch.Height / 3);
CharSwitch.Follower.transform.position = pos;
depth.aperture = 0.9f;
yield return new WaitForSeconds(0.75f);
}
if (CharSwitch.Follower.transform.position.y == Mathf.Round(CharSwitch.Height / 3 * 2))
{
Vector3 pos = CharSwitch.Follower.transform.position;
pos.y = CharSwitch.Height;
CharSwitch.Follower.transform.position = pos;
depth.aperture = 1f;
yield return new WaitForSeconds(0.75f);
}
yield return new WaitForEndOfFrame();
}
}
if (i == 1)
{
Vector3 pos = new Vector3(c.Instance.transform.position.x, CharSwitch.Height, c.Instance.transform.position.z);
if (CharSwitch.Follower.transform.position.x < pos.x)
{
pos.x += 0.35f;
}
else if (CharSwitch.Follower.transform.position.x > pos.x)
{
pos.x -= 0.35f;
}
CharSwitch.Follower.transform.position = pos;
yield return new WaitForEndOfFrame();
}
if(i == 2)
{
depth.focalTransform = c.Instance.transform;
Camera.main.GetComponent<SmoothFollow>().target = c.Instance.transform;
CharSwitch.Follower.height = 2;
while (Mathf.Round(CharSwitch.Follower.transform.position.y) != 2)
{
if (CharSwitch.Follower.transform.position.y == CharSwitch.Height)
{
depth.aperture = 1f;
Vector3 pos = CharSwitch.Follower.transform.position;
pos.y = Mathf.Round(CharSwitch.Height /3 * 2);
CharSwitch.Follower.transform.position = pos;
yield return new WaitForSeconds(0.75f);
}
if (CharSwitch.Follower.transform.position.y == Mathf.Round(CharSwitch.Height / 3 * 2))
{
depth.aperture = 0.9f;
Vector3 pos = CharSwitch.Follower.transform.position;
pos.y = Mathf.Round(CharSwitch.Height / 3);
CharSwitch.Follower.transform.position = pos;
yield return new WaitForSeconds(0.75f);
}
if (CharSwitch.Follower.transform.position.y == Mathf.Round(CharSwitch.Height / 3))
{
depth.aperture = 0.8f;
Vector3 pos = CharSwitch.Follower.transform.position;
pos.y = 2;
CharSwitch.Follower.transform.position = pos;
yield return new WaitForSeconds(0.75f);
}
yield return new WaitForEndOfFrame();
}
GameManager.Instance.CanShowSwitch = true;
depth.enabled = false;
}
i++;
}
StopCoroutine("DoCharSwitch");
yield return null;
}
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
[System.Serializable]
public class CharacterTransition
{
public float Height;
public float Speed;
public SmoothFollow Follower;
}
}
If I use the hover context actions in VS such as adding: using UnityStandardAssets.Utility; I get 17 plus errors.
Any ideas what is causing this. The SmoothFollow.cs file exists in Standard Assets/Utility folder.
Im not a coder or very limited at best so cant get my way around this issue.
Any help appreciated as I have been on this for 2 days solid, watched just about the entire content of youtube to no avail.
Many thanks in advance.