修改core匹配问题
This commit is contained in:
@@ -277,6 +277,13 @@ public class DoubleClickToFocus : MonoBehaviour
|
||||
StartCoroutine(MoveCamera(mainCamera, targetPos, transitionDuration, finalObject));
|
||||
}
|
||||
}
|
||||
Debug.Log(
|
||||
"====== CORE DEBUG ======\n" +
|
||||
"Object Name: " + finalObject.name + "\n" +
|
||||
"Instance ID: " + finalObject.GetInstanceID() + "\n" +
|
||||
"Position: " + finalObject.position + "\n" +
|
||||
"Active: " + finalObject.gameObject.activeSelf
|
||||
);
|
||||
core = finalObject.position;
|
||||
}
|
||||
}
|
||||
@@ -331,7 +338,7 @@ public class DoubleClickToFocus : MonoBehaviour
|
||||
//我在里面把参数写死,然后来一一匹配,传的参数就是gameobject的名字
|
||||
foreach (KeyValuePair<string, Vector3> pair in targetObjectAndPosition)
|
||||
{
|
||||
if (IconName.Substring(0, IconName.Length - 4) == pair.Key)
|
||||
if (IconName.Substring(0, IconName.Length - 4)+ "ViewPort" == pair.Key)
|
||||
{
|
||||
|
||||
Vector3 targetPos = pair.Value;
|
||||
@@ -339,6 +346,14 @@ public class DoubleClickToFocus : MonoBehaviour
|
||||
StartCoroutine(MoveCamera(mainCamera, targetPos, transitionDuration, finalObject));
|
||||
}
|
||||
}
|
||||
|
||||
Debug.Log(
|
||||
"====== CORE DEBUG ======\n" +
|
||||
"Object Name: " + finalObject.name + "\n" +
|
||||
"Instance ID: " + finalObject.GetInstanceID() + "\n" +
|
||||
"Position: " + finalObject.position + "\n" +
|
||||
"Active: " + finalObject.gameObject.activeSelf
|
||||
);
|
||||
core = finalObject.position;
|
||||
}
|
||||
|
||||
@@ -360,4 +375,5 @@ public class DoubleClickToFocus : MonoBehaviour
|
||||
}
|
||||
core = finalObject.position;
|
||||
}
|
||||
}
|
||||
}
|
||||
//123
|
||||
Reference in New Issue
Block a user