jwu/ex2D_Runtime — Issue #17: Set a camera after instantiating ex2d Sprite Animation prefab.
Author: nnn5
Created: 2011-11-28 07:16:36+00:00
State: open

Hi,

I'm trying to set a camera after instantiating an exSpriteAnimation(ex2D) prefab.
In the prefab, the camera set none. In the inspector window, it said "Prefab only" with red color at the camera box at ExSprite component.

I want to use it as clone instantiated from the prefab.
When I tried to set a camera from the script, the compiler said " Property UnityEngine.Component.camera is read only" as error.

I need to set a specified camera.
How can I solve it?