Skip to content

Scripting API


ok

Configs ⬇️

info

AdConfig.cs ⬇️

Stores ad settings, including game IDs, ad unit IDs, and rewards for Unity Ads.
ScriptableObject path Configs/AdConfig
public class AdConfig : ScriptableObject
{
// Reward amount for watching an ad
public int Reward;

// IronSource app key for iOS
public string IOSAppKey;

// IronSource app key for Android
public string AndroidAppKey;

// Placement name for rewarded ads
public string RewardedAdPlacementName;

// Rewarded ad unit ID for Android
public string RewardedAdIdAndroid;

// Rewarded ad unit ID for iOS
public string RewardedAdIdIOS;

// Whether the ads run in test suit mode
public bool IsActiveTextSuit;
}
info

AnimationConfig.cs ⬇️

Stores animation settings for planet animations, including blink effects and punch scale animations.
ScriptableObject path Configs/AnimationConfig
public class AnimationConfig : ScriptableObject
{
// Delay between planet blink animations
public float BlinkDelay;

// Minimum and maximum number of blink shapes
public Vector2 MinMaxBlinkShapes;

// Scale factor for punch animation effect
public float PunchAnimationScaleFactor = 0.2f;

// Duration of the punch animation effect
public float PunchAnimationScaleDuration = 0.2f;

// Returns the punch animation scale as a Vector3
public Vector3 GetPunchAnimationScaleFactor();
}
info

AudioConfig.cs ⬇️

Stores audio settings, including ambient music and sound effects (SFX).
ScriptableObject path Configs/AudioConfig
public class AudioConfig : ScriptableObject
{
// Ambient audio clip (background music)
public AudioClip Ambient;

// List of SFX data
public List<SfxData> SfxsData = new();
}

public struct SfxData
{
// Type of the SFX
public SfxType SfxType;

// Audio clip for the SFX
public AudioClip Sfx;

// Volume of the SFX (ranging from 0 to 1)
public float Volume;
}
info

GameplayConfig.cs ⬇️

Stores gameplay-related settings, including HUD elements, shape dropper, combo scoring, and spawn point configurations.
ScriptableObject path Configs/GameplayConfig
public class GameplayConfig : ScriptableObject
{
// Reference to the HUD (heads-up display) GameObject
public GameObject HUD;

// Reference to the shape dropper GameObject
public GameObject ShapeDropper;

// Interval time between shape drops (range from 0 to 5 seconds)
public float DropInterval = 1f;

// Time allowed to maintain combo streak (in seconds)
public float TimeToEndCombo = 0.5f;

// Multiplier for combo score
public int ComboScoreFactor = 5;

// Multiplier for combo coins
public int ComboCoinsFactor = 1;

// Position of the spawn point for shapes
public Vector3 SpawnPointPosition;
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.