private void CreateNotification(Vector3 position, string text, float duration, string color) { GameObject worldNotificationObj = Instantiate(worldNotificationPrefab); WorldNotification worldNotification = worldNotificationObj.GetComponent <WorldNotification>(); worldNotification.InitializeAndStart(new WorldNotificationArgs(position, text, duration, color)); }
public void ShowLocalNotification(WorldNotificationArgs worldNotificationArgs) { GameObject worldNotificationObj = Instantiate(worldNotificationPrefab); WorldNotification worldNotification = worldNotificationObj.GetComponent <WorldNotification>(); worldNotification.InitializeAndStart(worldNotificationArgs); }