[SerializeField]
ARSession m_ARSession ;
public ARSession arSession
{
get { return m_ARSession ; }
set { m_ARSession = value ; }
}
public Text errorText
{
get { return m_ErrorText ; }
set { m_ErrorText = value ; }
}
public Button saveButton
{
get { return m_SaveButton ; }
set { m_SaveButton = value ; }
}
public Button loadButton
{
get { return m_LoadButton ; }
set { m_LoadButton = value ; }
}
public Text logText
{
get { return m_LogText ; }
set { m_LogText = value ; }
}
Text m_MappingStatus ;
Text m_MappingStatusText ;
public Text mappingStatusText
{
get { return m_MappingStatusText ; }
set { m_MappingStatusText = value ; }
}
/// <summary>
/// Create an <c>ARWorldMap</c> and save it to disk.
m_LogMessages . Add ( logMessage ) ;
}
void SetActive ( Button button , bool active )
{
if ( button ! = null )
button . gameObject . SetActive ( active ) ;
}
void SetActive ( Text text , bool active )
{
if ( text ! = null )
text . gameObject . SetActive ( active ) ;
}
void SetText ( Text text , string value )
{
if ( text ! = null )
text . text = value ;
}
m_ErrorText . gameObject . SetActive ( false ) ;
m_SaveButton . gameObject . SetActive ( true ) ;
m_LoadButton . gameObject . SetActive ( true ) ;
m_MappingStatus . gameObject . SetActive ( true ) ;
SetActive ( errorText , false ) ;
SetActive ( saveButton , true ) ;
SetActive ( loadButton , true ) ;
SetActive ( mappingStatusText , true ) ;
m_ErrorText . gameObject . SetActive ( true ) ;
m_SaveButton . gameObject . SetActive ( false ) ;
m_LoadButton . gameObject . SetActive ( false ) ;
m_MappingStatus . gameObject . SetActive ( false ) ;
SetActive ( errorText , true ) ;
SetActive ( saveButton , false ) ;
SetActive ( loadButton , false ) ;
SetActive ( mappingStatusText , false ) ;
}
var sessionSubsystem = ARSubsystemManager . sessionSubsystem ;
msg + = m_LogMessages [ i ] ;
msg + = "\n" ;
}
m_LogText . text = msg ;
SetText ( logText , msg ) ;
m_MappingStatus . text = string . Format ( "Mapping Status: {0}" , sessionSubsystem . GetWorldMappingStatus ( ) ) ;
SetText ( mappingStatusText , string . Format ( "Mapping Status: {0}" , sessionSubsystem . GetWorldMappingStatus ( ) ) ) ;
#endif
}