유니티 프로젝트에서 학습용 AI와 함께 사용하기 위해 데이터를 저장하는 아주 간단한 클래스를 작성하고 있습니다. 관리자에서 여러 에이전트를 쉽게 사용자 지정할 수 있기를 원하며 수직으로 쌓인 확인란의 수가 프로젝트의이 부분을 검사자를 압도하게 만듭니다. 검사관의 오른쪽에 충분한 빈 공간을 하나의 섹션에서 사용할 수 있다면 간단하게 추한 것입니다.유니티 인스펙터에서 변수를 가로로 맞 춥니 다
커스텀 서랍 서랍 창과 검사기 창에 대해서는 많이 읽었지만 한 가지 변경 사항으로 전체 클래스가 표시되는 방식을 다시 작성하는 작업이 많은 것 같습니다.
은 참고로 여기 클래스 자체이다.
[System.Serializable]
public class NNInfo
{
public string networkName = "Agent";
[Header("Movement Properties")]
public float movementSpeed = 10f;
public float rotationSpeed = 1f;
[Header("Learning Properties")]
public float learningRate = 0.1f;
public float momentum = 0f;
public Rewards rewardFunc;
public int[] hiddenLayers;
[Header("Other Properties")]
public int maxHealth = 1000;
[Header("Optional Inputs")]
public bool m_PointToNearestBall = false; // input which is 1 while the agent is facing a ball and -1 when facing away
public bool m_DistanceToNearestBall = false; // input which is 1 while the agent is at the ball and -1 when at max possible distance away
public bool m_PointToEndzone = false; // similar to m_PointToNearestBall but for the endzone
public bool m_Position = false; // two inputs which inform the player of its normalized x and y coordinates on the field
public bool m_WhetherHoldingBall = false; // tells the player whether its holding a ball
public bool m_CanSeeHealth = false; // Whether the player can know its own health
[Header("Optional Outputs")]
public bool m_ForwardLeft = false; // turn left and move forward simultaneously
public bool m_ForwardRight = false; // turn right and move forward simultaneously
public bool m_Reverse = false; // move backwards
public bool m_Flip = false; // instantly switch to opposite direction
public bool m_TurnToBall = false; // instantly turn to face nearest ball
public bool m_TurnToLeft = false; // instantly turn to face left side of field
public bool m_Attack = false; // attack a player (or idle if no contact)
}
이것은 정말 멋진 아이디어이지만 쉬운 방법으로는 가능하지 않다고 생각합니다. – byxor
나는이 주제에 속하지 않는다고 생각합니다. 질문은 Unity Dev 도구에 관한 것이므로 순수 프로그래밍과 직접 관련이 없습니다. Game Dev (http://gamedev.stackexchange.com/) 또는 Unity Answers 웹 사이트 (http://answers.unity3d.com/)에 속하지 않아야합니다. –
을 사용하여 편집기 코드를 업데이트하거나 사용자 고유의 기능을 작성해야합니다. 그다지 어렵지 않고 온라인에서 많은 자습서가 있습니다. – Cabrra