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.

19 lines
627 B

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