Mention 3.1.1+ APIs in new optimization tutorials

This commit is contained in:
Rémi Verschelde
2019-05-31 11:49:15 +02:00
parent fa784d4ce1
commit a6446ccf49
2 changed files with 8 additions and 0 deletions

View File

@@ -44,6 +44,9 @@ controlled with the :ref:`MultiMesh.visible_instance_count <class_MultiMesh_prop
property. The typical workflow is to allocate the maximum amount of instances that will be used,
then change the amount visible depending on how many are currently needed.
.. note:: The :ref:`MultiMesh.visible_instance_count <class_MultiMesh_property_visible_instance_count>`
property was first added in Godot 3.1.1-stable.
Multimesh example
-----------------
@@ -65,6 +68,7 @@ efficient for millions of objects, but for a few thousands, GDScript should be f
# Then resize (otherwise, changing the format is not allowed).
multimesh.instance_count = 10000
# Maybe not all of them should be visible at first.
# Note: Property only available in Godot 3.1.1 or later.
multimesh.visible_instance_count = 1000
# Set the transform of the instances.
for i in multimesh.visible_instance_count:

View File

@@ -75,6 +75,10 @@ For nodes, there are many functions available:
*instance base* via the :ref:`VisualInstance.get_instance() <class_VisualInstance_method_get_instance>`
and :ref:`VisualInstance.get_base() <class_VisualInstance_method_get_base>` respectively.
.. note:: The :ref:`VisualInstance.get_instance() <class_VisualInstance_method_get_instance>`
and :ref:`VisualInstance.get_base() <class_VisualInstance_method_get_base>` methods were first
exposed to the scripting API in Godot 3.1.1-stable.
Just explore the nodes and resources you are familiar with and find the functions to obtain the server *RIDs*.
It is not advised to control RIDs from objects that already have a node associated. Instead, server