You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
700 B

6 years ago
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. /// <summary>
  5. /// Example of a script using [HideInPrfab]
  6. /// </summary>
  7. public class HideInPrefabExample : MonoBehaviour {
  8. [Header ("Drag Me into scene to show hidden properties.")]
  9. [HideInPrefab]
  10. public float HiddenFloat = 5; //Hidden in prefab inspector
  11. public float ShownFloat = 6; //Not hidden in prefab inspector
  12. [HideInInspector]
  13. public float AlwaysHiddenFloat = 7; //Always hidden (Unity's default implementation)
  14. [HideInPrefab]
  15. public GameObject HiddenGameObject; //Hidden in Prefab inspector
  16. public GameObject ShownGameObject; //NotHidden in Prefab inspector
  17. }