Please use pasteall or something similar next time you post code! Images of partial code is not ideal.
Try also disabling the MainCamera at the same time that you enable the two GameCameras: KickStarter.mainCamera.GetComponent <Camera>().enabled = false;
That should be done after disabling the Camera system in Engine: Manage systems.
You are also re-enabling the Camera system before your Engine: Wait Action - so it's being disabled and then re-enabled instnantly.
Know that you can expose your GameCamera fields, and the state you want them to have, in a single Action to avoid writing seperate enable/disable Actions.
Replace all of the Run function's code beneath the MainCamera line with:
return 0f;
As the description in there explains, this is necessary for "instantaneous" Actions.
You will need to provide more detail than it just not working. Did the transition work, or none of it? What is the state of the three cameras afterwards?
If the player cannot be controlled, it might be in Cutscene mode. At the bottom of the Settings Manager, click List active ActionLists in Game window?. What does the debug box in the corner of the Game window say when the ActionList is complete and control ought to be resumed?
What do the 999+ errors in the Console window? Please show the stracktrace of the first, which is displayed when selected.
You don't need to disable the Trigger through code - use the Object: Send message Action at the start of the ActionList to send the message "Turn Off" to itself.
The Trigger12 Action should have the same "return 0f;" change made to it.
When complete, the GameCamera1 and GameCamera2 should have their Camera components de-activated - not the GameObjects themselves.
The error is related to the camera issue, so should resolve itself once everything else is. Try moving the second Engine: Manage systems Action below the ActionDeactivateCameraComponent.
I made the changes.ActionDeactivateCameraComponent does not work.The camera components are still active.How can i activate GameCamera1- the GameObject.
first .ActionDeactivateCameraComponent still does not work.Camera components do not get inactive.I tried to activate GameCamera1 in ActionDeactivateCameraComponent and Trigger12 but no chance.
As a test, leave out the Trigger12 Action, and simply have the two GameCameras activate, wait a brief time, and then de-activate - with the MainCamera doing the opposite. The two Actions you've posted should work fine - I've tested the code - so it could well be the third-party asset that's causing the issue.
now my player walks through the scene crossing the trigger turning camera components on andvout.And i can control the player but all other camera switches from AC are not working.Also the same error occurs.
And this is after removing the Trigger12 Action? Which error, exactly? There have been many.
What does the MainCamera Inspector look like in full? What are the exact states of the GameCameras - both gameobjects and Camera components? In order to help, I need to know the fine details - giving me the broad overview is not enough, I'm afraid.
Your first two images show GameCamera1 both enabled and disabled - what is the order here?
It looks like they are being enabled correctly but not disabled afterwards - i.e. ActionActivateCameraComponent is running, but not ActionDeactivateCameraComponent.
Instead of disabling the Trigger12 Action, use the ActionList Editor window to re-route the flow of Actions around it.
first the camera component is disabled.Then after walking through Trigger12 my Player is in an endless loop where the camera component is enabled and disabled until i click somewhere else.
I cannot delete the connection between Trigger12 and EngineWait.
Comments
Try also disabling the MainCamera at the same time that you enable the two GameCameras:
KickStarter.mainCamera.GetComponent <Camera>().enabled = false;
That should be done after disabling the Camera system in Engine: Manage systems.
You are also re-enabling the Camera system before your Engine: Wait Action - so it's being disabled and then re-enabled instnantly.
Know that you can expose your GameCamera fields, and the state you want them to have, in a single Action to avoid writing seperate enable/disable Actions.
return 0f;
As the description in there explains, this is necessary for "instantaneous" Actions.
You will need to provide more detail than it just not working. Did the transition work, or none of it? What is the state of the three cameras afterwards?
If the player cannot be controlled, it might be in Cutscene mode. At the bottom of the Settings Manager, click List active ActionLists in Game window?. What does the debug box in the corner of the Game window say when the ActionList is complete and control ought to be resumed?
What do the 999+ errors in the Console window? Please show the stracktrace of the first, which is displayed when selected.
pic2
The Trigger12 Action should have the same "return 0f;" change made to it.
When complete, the GameCamera1 and GameCamera2 should have their Camera components de-activated - not the GameObjects themselves.
The error is related to the camera issue, so should resolve itself once everything else is. Try moving the second Engine: Manage systems Action below the ActionDeactivateCameraComponent.
You can either look in the code of that asset, or just activate it as part of your Action:GameObject.Find ("GameCamera1").SetActive (true);
What does the MainCamera Inspector look like in full? What are the exact states of the GameCameras - both gameobjects and Camera components? In order to help, I need to know the fine details - giving me the broad overview is not enough, I'm afraid.
The disabled Trigger and the error is seen on every picture:
It looks like they are being enabled correctly but not disabled afterwards - i.e. ActionActivateCameraComponent is running, but not ActionDeactivateCameraComponent.
Instead of disabling the Trigger12 Action, use the ActionList Editor window to re-route the flow of Actions around it.
Where are you using the Object: Send message Action to disable the Trigger?