# Set Camera Channel
Grammar — Set model camera name from u for player player to render-to-texture channel channel using aspect ratio aspectRatio|AspectRatio.
Flags —Native
|Action
Sets a model camera for the specified unit to be rendered to the specified render-to-texture channel.
# Arguments
int
— Playerunit
— CameraUnitstring
<modelcamera> — Camera Nameint
— Channelfixed
— Aspect Ratio
Returns — void
native void CameraSetChannel(
int player,
unit cameraUnit,
string cameraName,
int channel,
fixed aspectRatio,
);
# Related
Category: Camera / Model Cameras
- Use Model Camera —
void
— CameraUseModel - Set Camera Channel —
void
— CameraSetChannel - Clear Camera Channel —
void
— CameraClearChannel
# Examples
campaigns/void.sc2campaign — base.sc2maps/maps/campaign/void/pstory01.sc2map/MapScript.galaxy:1192
UnitSetScale(libVCST_gf_ClickableUnit("DTLeader"), 110.0, 110.0, 110.0);
gf_SetBridgeEnviromentLighting();
CameraSetChannel(1, libVCST_gf_ClickableUnit("BridgeConsole"), "SMC2_Bridge_Communicator_Camera", 1, 1.0);
libVCST_gf_ToggleInteractives(true);
UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeBattleUI, true);
campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pstory01.sc2map — MapScript.galaxy:1192
UnitSetScale(libVCST_gf_ClickableUnit("DTLeader"), 110.0, 110.0, 110.0);
gf_SetBridgeEnviromentLighting();
CameraSetChannel(1, libVCST_gf_ClickableUnit("BridgeConsole"), "SMC2_Bridge_Communicator_Camera", 1, 1.0);
libVCST_gf_ToggleInteractives(true);
UISetFrameVisible(PlayerGroupAll(), c_syncFrameTypeBattleUI, true);
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:6634
libCOMI_gv_cM_ZeratulProphecyCamera = UnitLastCreated();
libNtve_gf_ShowHideUnit(libCOMI_gv_cM_ZeratulProphecyCamera, false);
CameraSetChannel(libCOMI_gv_cM_ZeratulPlayer, libCOMI_gv_cM_ZeratulProphecyCamera, "Camera_Basic", 1, 1.0);
}
}