Ok, I did the edit's, Still finding 'None' in both where the 'Player' should be, and 'None' in the Camera script section.
Minimap Kit
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
- BeNjO
- Member
- Posts: 12
- Joined: Sat Aug 29, 2015 10:34 am
Its on the prefab, The screen shot with the MM is before and during game play.
during game play:
during editor:
Edit:
I think it has something to do with loading the prefab in the character screen, then in scene1, its not refreshing/adding the new player refab in scene1.
having it unticked, Then ticking it manually ingame and it works fine, Just need to figure out how to make it work without me ticking it.
during game play:
during editor:
Edit:
I think it has something to do with loading the prefab in the character screen, then in scene1, its not refreshing/adding the new player refab in scene1.
having it unticked, Then ticking it manually ingame and it works fine, Just need to figure out how to make it work without me ticking it.
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
- BeNjO
- Member
- Posts: 12
- Joined: Sat Aug 29, 2015 10:34 am
Its finding the right place to use it, Is this right?
Code: Select all
var MM : boolean;
MM = true;
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
Who is trying to do with that?BeNjO wrote:Its finding the right place to use it, Is this right?
Code: Select all
var MM : boolean; MM = true;
I mean copy the content / code of "MM" script in another script of the player as "Player Main" but I notice you use JS, so it would be useless because you could not access C#.
so, I recommend that you locate the problem that because the script "MM" does not execute, because if you do you will solve this problem.
- BeNjO
- Member
- Posts: 12
- Joined: Sat Aug 29, 2015 10:34 am
Hi,
I tried all last night and all today (from 7am till 13:50), I have googled answers and everything and I still cannot seem to run the MM script from anywhere since its C# and not JS. All the results I found didn't work. I cannot seem to "enable" or "tick" the MM script on the Player prefab. I will just have to not use it, Or pay someone to convert the C# script into JS to see if that helps me.
Ben
I tried all last night and all today (from 7am till 13:50), I have googled answers and everything and I still cannot seem to run the MM script from anywhere since its C# and not JS. All the results I found didn't work. I cannot seem to "enable" or "tick" the MM script on the Player prefab. I will just have to not use it, Or pay someone to convert the C# script into JS to see if that helps me.
Ben
- BeNjO
- Member
- Posts: 12
- Joined: Sat Aug 29, 2015 10:34 am
Hi,
So I managed to get it working, But I ran into a problem, If I chance scenes, say Scene1 to Scene2, The camera does not update, Since I'm using the script you provided and enabling it when the scene changes, re-ticking the check box next to the script doesnt work, It works the first time but not a sec thus my problem arises.
Edit:
I changed the script a little so it looks like this:
So I could call Init from somewhere else, But struggling to do so, Any help would be nice.
So I managed to get it working, But I ran into a problem, If I chance scenes, say Scene1 to Scene2, The camera does not update, Since I'm using the script you provided and enabling it when the scene changes, re-ticking the check box next to the script doesnt work, It works the first time but not a sec thus my problem arises.
Edit:
I changed the script a little so it looks like this:
Code: Select all
using UnityEngine;
using System.Collections;
public class Trigger : MonoBehaviour {
GameObject m_Player;
// Use this for initialization
void Start()
{
Init();
}
public void Init()
{
m_Player = this.gameObject;
bl_MiniMap m = FindObjectOfType<bl_MiniMap>();
bl_MMCompass mc = FindObjectOfType<bl_MMCompass>();
if (m != null)
{
m.m_Target = m_Player;
m.ConfigureCamera3D();
Debug.Log("Send Player To MiniMap");
}
if (mc != null)
{
mc.Target = m_Player.transform;
Debug.Log("Send Player to Compass");
}
StartCoroutine(CheckAgain());
}
IEnumerator CheckAgain()
{
yield return new WaitForSeconds(3);
m_Player = this.gameObject;
bl_MiniMap m = FindObjectOfType<bl_MiniMap>();
bl_MMCompass mc = FindObjectOfType<bl_MMCompass>();
if (m != null && m.m_Target == null)
{
m.m_Target = m_Player;
Debug.Log("Send Player To MiniMap Again");
}
if (mc != null && mc.Target == null)
{
mc.Target = m_Player.transform;
Debug.Log("Send Player to Compass");
}
}
}