Hi Ufuk Coban,
This function already exists - Spark.getConfig().getStage() returns the stage your game is running on (preview or live).
https://docs.gamesparks.com/api-documentation/cloud-code-api/configuration/sparkconfig.html
Regards,
Jonathan.
Great ! Thanks.
Ufuk Coban
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.