Hi Ufuk Coban,
This function already exists - Spark.getConfig().getStage() returns the stage your game is running on (preview or live).
Great ! Thanks.
There should be function like "bool Spark.IsLive()". i wrote some test codes and can forget those. so i must restrict them to work on live.